class TestLoader(unittest.TestCase):

    def setUp(self):
        self.memory = ToyMemory()
        self.memory_manager = ToyMemoryAdmin(self.memory)
        self.logical_memory = LogicalMemory(self.memory_manager)
        self.program = Program("unPrograma")
        self.program.addInstruction("")
        self.loader = Loader(None,self.logical_memory)

    def test_when_given_loader_and_pcb_then_it_charges_to_memory(self):
        self.assertTrue(len(self.memory.representation) == 0)
        self.loader.load(self.program)
        self.assertFalse(len(self.memory.representation) == 0)
 def setUp(self):
     self.memory = ToyMemory()
     self.memory_manager = ToyMemoryAdmin(self.memory)
     self.logical_memory = LogicalMemory(self.memory_manager)
     self.program = Program("unPrograma")
     self.program.addInstruction("")
     self.loader = Loader(None,self.logical_memory)