SHARE
TWEET

Untitled

a guest Jan 22nd, 2020 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class ShowAllPeople_Tests {
  2.     private Command testCommand;
  3.     private ManagementFactory managementFactory;
  4.     private ManagementRepository managementRepository;
  5.     private Person person;
  6.  
  7.     @Before
  8.     public void before() {
  9.     managementFactory = new ManagementFactoryImpl();
  10.     managementRepository = new ManagementRepositoryImpl();
  11.     person = new PersonImpl("testPerson");
  12.     managementRepository.addPerson(person.getPersonName(), person);
  13.     testCommand = new ShowAllPeople(managementFactory, managementRepository);
  14.     }
  15.  
  16.     @Test
  17.     public void execute_should_showAllPeople_when_passedValidArguments() {
  18.  
  19.         testCommand.execute(asList());
  20.  
  21.         Assert.assertEquals("testPerson",
  22.                 managementRepository.getPeople().keySet().toString().replaceAll("[\\[\\]]",""));
  23.     }
  24.  
  25.  
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top