def testcase_03(self):
     for y in range(4):
         a = NOrGate(4)
         for z in range(4):
             a.setInput(z , 1)
         for x in range(1):
             a.setInput(x + y, 0)
         a.execute()
         self.assertFalse(a.getOutputElement(0), "Class NOrGate: Testcase 3_{} failed.".format(y))
 def testcase_02(self):
     for y in range(3):
         a = NOrGate(4)
         for x in range(2):
             a.setInput(x + y, 1)
         a.execute()
         self.assertFalse(a.getOutputElement(0), 'Class NOrGate: Testcase 2_{} failed.'.format(y))
 def testcase_04(self):
     a = NOrGate()
     a.Input0 = True
     a.Input1 = True
     a.execute()
     self.assertFalse(a.Output, 'Class NOrGate: Testcase 4 failed.')
 def testcase_01(self):
     a = NOrGate()
     a.Input0 = False
     a.Input1 = False
     a.execute()
     self.assertTrue(a.Output, 'Class NOrGate: Testcase 1 failed.')
 def testcase_00(self):
     a = NOrGate()
     self.assertFalse(a.Input0, 'Class NOrGate: Testcase 0 failed.')
     self.assertFalse(a.Input1, 'Class NOrGate: Testcase 0 failed.')
     self.assertTrue(a.Output, 'Class NOrGate: Testcase 0 failed.')
 def testcase_05(self):
     a = NOrGate(4)
     for x in range(2,5):
         a.setInputNr(x)
         self.assertEqual(len(a.getInput()),x, 'Class NOrGate: Testcase 4_{} failed.'.format(x))
 def testcase_04(self):
     a = NOrGate(4)
     for x in range(4):
         a.setInput(x, 1)
     a.execute()
     self.assertFalse(a.getOutputElement(0), 'Class NOrGate: Testcase 4 failed.')
 def testcase_02_3(self):
     a = NOrGate(4)
     a.setInput(3, 1)
     a.setInput(0, 1)
     a.execute()
     self.assertFalse(a.getOutputElement(0), 'Class NOrGate: Testcase 2_3 failed.')
 def testcase_00(self):
     a = NOrGate(4)
     for x in range(4):
         self.assertFalse(a.getInputElement(x), 'Class NOrGate: Testcase 0 failed.')
     self.assertTrue(a.getOutputElement(0), 'Class NOrGate: Testcase 0 failed.')
     self.assertEqual(len(a.getInput()), 4, 'Class NOrGate: Testcase 4_{} failed.'.format(x))