コード例 #1
0
 @Test
 public void shouldCreateBuildConfigurationWithNameOfArchivedConfiguration() {
   String name = randomAlphabetic(10);
   BuildConfiguration archived = createValidBuildConfiguration(name);
   archived.setArchived(true);
   repository.save(archived);
   repository.save(createValidBuildConfiguration(name));
 }
コード例 #2
0
 @Test
 public void shouldNotCreateBuildConfigurationWithDuplicatedName() {
   String name = randomAlphabetic(10);
   repository.save(createValidBuildConfiguration(name));
   BuildConfiguration duplicatedConfiguration = createValidBuildConfiguration(name);
   assertThrows(
       () -> repository.save(duplicatedConfiguration),
       org.hibernate.exception.ConstraintViolationException.class);
 }
コード例 #3
0
 @Test
 public void shouldCreateBuildConfigurationWithTwoArchivedWithTheSameName() {
   String name = randomAlphabetic(10);
   BuildConfiguration config1 = createValidBuildConfiguration(name);
   BuildConfiguration config2 = createValidBuildConfiguration(name);
   config1.setArchived(true);
   repository.save(config1);
   config2.setArchived(true);
   repository.save(config2);
   repository.save(createValidBuildConfiguration(name));
 }
コード例 #4
0
 @Test
 public void shouldCreateBuildConfiguration() {
   repository.save(createValidBuildConfiguration(randomAlphabetic(10)));
 }