/** * {@inheritDoc} */ @Override public List<Profile> getAllProfiles() { return ciManager.getAllProfiles(); }
@Test public void importProfile() throws Exception { Profile profile = new Profile(); profile.setId("myId"); profile.setName("test"); manager.importProfile(profile); assertThat(profile.getId(), is("myId")); assertThat(profile.getImportDate(), is(not(nullValue()))); assertThat(manager.getAllProfiles(), hasItem(profile)); }
@Test public void createProfileCheckId() throws Exception { Profile profile = new Profile(); profile.setName("test"); profile.setProfileData(new SensorAssignmentProfileData()); manager.createProfile(profile); assertThat(profile.getId(), is(not(nullValue()))); assertThat(profile.getCreatedDate(), is(not(nullValue()))); assertThat(manager.getAllProfiles(), hasItem(profile)); }
@Test public void createProfileCheckExists() throws Exception { Profile profile = new Profile(); profile.setName("test"); profile.setProfileData(new SensorAssignmentProfileData()); manager.createProfile(profile); assertThat(manager.getAllProfiles(), hasItem(profile)); }
@Test public void deleteProfile() throws Exception { Profile profile = new Profile(); profile.setName("test"); profile.setProfileData(new SensorAssignmentProfileData()); profile = manager.createProfile(profile); manager.deleteProfile(profile); assertThat(manager.getAllProfiles(), is(empty())); }