def test_that_can_retrieve_states_from_pmds(self): self.assertEqual(len(PropertyManagerDataService.getObjectNames()), 0) states = {0: get_example_state(), 1: get_example_state()} pms = PropertyManagerService() pms.add_states_to_pmds(states) retrieved_states = pms.get_states_from_pmds() self.assertEqual(len(retrieved_states), 2) self.assertTrue(isinstance(retrieved_states[0], type(states[0]))) self.assertEqual(len(PropertyManagerDataService.getObjectNames()), 2) self._remove_all_property_managers()
def test_that_can_retrieve_states_from_pmds(self): self.assertTrue(len(PropertyManagerDataService.getObjectNames()) == 0) states = {0: get_example_state(), 1: get_example_state()} pms = PropertyManagerService() pms.add_states_to_pmds(states) retrieved_states = pms.get_states_from_pmds() self.assertTrue(len(retrieved_states) == 2) self.assertTrue(isinstance(retrieved_states[0], type(states[0]))) self.assertTrue(len(PropertyManagerDataService.getObjectNames()) == 2) self._remove_all_property_managers()
def test_that_it_returns_empty_list_if_no_states_have_been_added(self): pms = PropertyManagerService() states = pms.get_states_from_pmds() self.assertEqual(states, []) self._remove_all_property_managers()
def test_that_it_returns_empty_list_if_no_states_have_been_added(self): pms = PropertyManagerService() states = pms.get_states_from_pmds() self.assertTrue(states == []) self._remove_all_property_managers()