def testCollectInfoYesNo(self): self.infoCollector = InfoCollector(self.classesToCollectInfoAbout) self.timesGlobalTraceWasCalled = 0 self.infoCollector.globalTrace = self.mockGlobalTrace self.infoCollector.collectInfoYes() testClassOne = TestClassOne() testClassOne.methodOne() self.infoCollector.collectInfoNo() testClassOne.methodOne() self.assertEqual(3, self.timesGlobalTraceWasCalled)
def excerciseTestClasses(self): testClassOne = TestClassOne() testClassOne.methodOne("foo") testClassOne.methodTwo(1111, "bar") testClassTwo = TestClassTwo() testClassTwo.methodOne() testClassTwo.methodTwo() testClassThree = TestClassThree() testClassThree.privateMethod() testClassThree.publicMethod() testClassFour = TestClassFour() testClassFour.methodOne("a", 1, 3.14592)