Beispiel #1
0
  /**
   * Converts a mutable bo to it's immutable counterpart
   *
   * @param bo the mutable business object
   * @return the immutable object
   */
  public static KrmsTypeDefinition to(KrmsTypeBo bo) {
    if (bo == null) {
      return null;
    }

    return KrmsTypeDefinition.Builder.create(bo).build();
  }
 @Test
 public void test_KrmsTypeDefinition_set_validation_id_success_null() {
   KrmsTypeDefinition.Builder builder = KrmsTypeDefinition.Builder.create(NAME, NAMESPACE);
   builder.setId(null);
 }
 @Test(expected = java.lang.IllegalArgumentException.class)
 public void test_KrmsTypeDefinition_set_validation_id_fail_empty() {
   KrmsTypeDefinition.Builder builder = KrmsTypeDefinition.Builder.create(NAME, NAMESPACE);
   builder.setId("");
 }
 @Test(expected = java.lang.IllegalArgumentException.class)
 public void test_KrmsTypeDefinition_set_validation_namespace_fail_whitespace() {
   KrmsTypeDefinition.Builder builder = KrmsTypeDefinition.Builder.create(NAME, NAMESPACE);
   builder.setNamespace("    ");
 }
 @Test(expected = java.lang.IllegalArgumentException.class)
 public void test_KrmsTypeDefinition_Builder_create_fail_all_null() {
   KrmsTypeDefinition.Builder.create(null, null);
 }
 public static KrmsTypeDefinition buildFullKrmsTypeDefinition() {
   KrmsTypeDefinition.Builder builder = KrmsTypeDefinition.Builder.create(NAME, NAMESPACE);
   builder.setId(ID);
   KrmsTypeDefinition krmsTypeDefinition = builder.build();
   return krmsTypeDefinition;
 }
 @Test
 public void test_KrmsTypeDefinition_Builder_create_and_build() {
   KrmsTypeDefinition.Builder builder = KrmsTypeDefinition.Builder.create(NAME, NAMESPACE);
   builder.build();
 }
 @Test
 public void test_KrmsTypeDefinition_Builder_create() {
   KrmsTypeDefinition.Builder.create(NAME, NAMESPACE);
 }