def should_not_raise_exception_if_return_values_are_ignored(self):
     #run second test
     self.config.runtime.start_spec()
     proxy2 = test_proxy(self.legacy_object2,
                         check_return=False,
                         runtime_option=self.config.runtime)
     print proxy2.get_name()  # return "Jiro"
 def proxies_of_legacy_code_these_return_values_are_changed(self):
     legacy_object1 = self.LegacyPeopleClass("Taro", 32)
     self.legacy_object2 = self.LegacyPeopleClass("Jiro", 30)
     #recording
     self.config = setting.PySpecConfig()
     proxy1 = test_proxy(legacy_object1, runtime_option=self.config.runtime)
     proxy1.get_name()  # return "Taro"
 def proxies_of_legacy_code_these_return_values_are_changed(self):
     legacy_object1 = self.LegacyPeopleClass("Taro", 32)
     self.legacy_object2 = self.LegacyPeopleClass("Jiro", 30)
     #recording
     self.config = setting.PySpecConfig()
     proxy1 = test_proxy(legacy_object1, runtime_option=self.config.runtime)
     proxy1.get_name() # return "Taro"
 def proxies_of_legacy_code_that_are_not_changed(self):
     self.legacy_object = self.LegacyPeopleClass("Taro", 32)
     #recording
     self.config = setting.PySpecConfig()
     proxy1 = test_proxy(self.legacy_object,
                         runtime_option=self.config.runtime)
     proxy1.get_name()
 def proxies_of_legacy_code_that_are_not_changed(self):
     self.legacy_object = self.LegacyPeopleClass("Taro", 32)
     #recording
     self.config = setting.PySpecConfig()
     proxy1 = test_proxy(self.legacy_object,
             runtime_option=self.config.runtime)
     proxy1.get_name()
Example #6
0
def TranslatorWithProxy(document):
    translator = CodePlexTranslator(document)
    return test_proxy(translator, check_return=False)
 def should_raise_exception(self):
     #run second test
     self.config.runtime.start_spec()
     proxy2 = test_proxy(self.legacy_object2,
                         runtime_option=self.config.runtime)
     print proxy2.get_name()  # return "Jiro"
 def attribute_access_to_the_proxy_of_legacy_code(self):
     legacy_object = self.LegacyPeopleClass("Taro", 32)
     self.config = setting.PySpecConfig()
     proxy = test_proxy(legacy_object, runtime_option=self.config.runtime)
     print proxy.name
 def method_call_to_the_proxy_of_legacy_code(self):
     legacy_object = self.LegacyPeopleClass("Taro", 32)
     self.config = setting.PySpecConfig()
     proxy = test_proxy(legacy_object, runtime_option=self.config.runtime)
     print proxy.get_name()
 def should_not_raise_exception_if_return_values_are_ignored(self):
     #run second test
     self.config.runtime.start_spec()
     proxy2 = test_proxy(self.legacy_object2, check_return=False,
             runtime_option=self.config.runtime)
     print proxy2.get_name() # return "Jiro"
 def should_raise_exception(self):
     #run second test
     self.config.runtime.start_spec()
     proxy2 = test_proxy(self.legacy_object2,
             runtime_option=self.config.runtime)
     print proxy2.get_name() # return "Jiro"
 def attribute_access_to_the_proxy_of_legacy_code(self):
     legacy_object = self.LegacyPeopleClass("Taro", 32)
     self.config = setting.PySpecConfig()
     proxy = test_proxy(legacy_object, runtime_option=self.config.runtime)
     print proxy.name
 def method_call_to_the_proxy_of_legacy_code(self):
     legacy_object = self.LegacyPeopleClass("Taro", 32)
     self.config = setting.PySpecConfig()
     proxy = test_proxy(legacy_object, runtime_option=self.config.runtime)
     print proxy.get_name()