def test_that_and_this_after_creation_with_two(self):
     object = Object('two')
     self.assertEqual(None, object.this())
     self.assertEqual(None, object.that())
示例#2
0
 def test_do_something_simple_with_system_returns_None_for_system_instance(
         self):
     alist = [Object('one'), Object('two'), Object('three')]
     composite = Composite(alist)
     self.assertEqual(None,
                      do_something_simple_with_system(System(composite)))
示例#3
0
 def test_that_and_this_after_creation_with_two(self):
     object = Object('two')
     self.assertEqual(None, object.this())
     self.assertEqual(None, object.that())
示例#4
0
 def test_that_and_this_after_creation_with_list(self):
     alist = [Object('one'), Object('two'), Object('three')]
     composite = Composite(alist)
     self.assertEqual(None, composite.this())
     self.assertEqual(None, composite.that())
示例#5
0
 def test_do_that_and_do_this_after_creation_with_composite_instance(self):
     alist = [Object('one'), Object('two'), Object('three')]
     composite = Composite(alist)
     system = System(composite)
     self.assertEqual(None, system.do_this())
     self.assertEqual(None, system.do_that())
示例#6
0
 def test_just_do_it_returns_None_after_creation_with_system_instance(self):
     alist = [Object('one'), Object('two'), Object('three')]
     composite = Composite(alist)
     system = System(composite)
     facade = Facade(system)
     self.assertEqual(None, facade.just_do_it())