@Test public void fillMissingFields_fail_no_id() throws Exception { thrown.expect(NullPointerException.class); thrown.expectMessage("missing field: camunda.bpm.admin-user.id"); adminUser(null, null, null, null, null).init(); }
public User init() { requireNonNull(getId(), "missing field: camunda.bpm.admin-user.id"); requireNonNull(getPassword(), "missing field: camunda.bpm.admin-user.password"); if (StringUtils.isBlank(getFirstName())) { setFirstName(StringUtils.capitalize(id)); } if (StringUtils.isBlank(getLastName())) { setLastName(StringUtils.capitalize(id)); } if (StringUtils.isBlank(getEmail())) { setEmail(id + "@localhost"); } return this; }
AdminUserProperty implements User { public User init() { requireNonNull(getId(), "missing field: camunda.bpm.admin-user.id"); requireNonNull(getPassword(), "missing field: camunda.bpm.admin-user.password"); if (StringUtils.isBlank(getFirstName())) { setFirstName(StringUtils.capitalize(id)); } if (StringUtils.isBlank(getLastName())) { setLastName(StringUtils.capitalize(id)); } if (StringUtils.isBlank(getEmail())) { setEmail(id + "@localhost"); } return this; } }
AdminUserProperty implements User { public User init() { requireNonNull(getId(), "missing field: camunda.bpm.admin-user.id"); requireNonNull(getPassword(), "missing field: camunda.bpm.admin-user.password"); if (StringUtils.isBlank(getFirstName())) { setFirstName(StringUtils.capitalize(id)); } if (StringUtils.isBlank(getLastName())) { setLastName(StringUtils.capitalize(id)); } if (StringUtils.isBlank(getEmail())) { setEmail(id + "@localhost"); } return this; }  }
AdminUserProperty implements User { public User init() { requireNonNull(getId(), "missing field: camunda.bpm.admin-user.id"); requireNonNull(getPassword(), "missing field: camunda.bpm.admin-user.password"); if (StringUtils.isBlank(getFirstName())) { setFirstName(StringUtils.capitalize(id)); } if (StringUtils.isBlank(getLastName())) { setLastName(StringUtils.capitalize(id)); } if (StringUtils.isBlank(getEmail())) { setEmail(id + "@localhost"); } return this; }  User init(); @Override String getId(); @Override void setId(String id); @Override String getFirstName(); @Override void setFirstName(String firstName); @Override String getLastName(); @Override void setLastName(String lastName); @Override String getEmail(); @Override void setEmail(String email); @Override String getPassword(); @Override void setPassword(String password); @Override String toString(); }
AdminUserProperty implements User { public User init() { requireNonNull(getId(), "missing field: camunda.bpm.admin-user.id"); requireNonNull(getPassword(), "missing field: camunda.bpm.admin-user.password"); if (StringUtils.isBlank(getFirstName())) { setFirstName(StringUtils.capitalize(id)); } if (StringUtils.isBlank(getLastName())) { setLastName(StringUtils.capitalize(id)); } if (StringUtils.isBlank(getEmail())) { setEmail(id + "@localhost"); } return this; }  User init(); @Override String getId(); @Override void setId(String id); @Override String getFirstName(); @Override void setFirstName(String firstName); @Override String getLastName(); @Override void setLastName(String lastName); @Override String getEmail(); @Override void setEmail(String email); @Override String getPassword(); @Override void setPassword(String password); @Override String toString();  }