@Test public void shouldThrowExceptionIfActiveAndStartDateNull() throws Exception { ProgramSupported programSupported = new ProgramSupported(12345L, true, null); expectedException.expect(DataException.class); expectedException.expectMessage("supported.programs.invalid"); programSupported.isValid(); }
public void isValid() { if (this.active && this.startDate == null) throw new DataException("supported.programs.invalid"); }
ProgramSupported extends BaseModel implements Importable { public void isValid() { if (this.active && this.startDate == null) throw new DataException("supported.programs.invalid"); } }
ProgramSupported extends BaseModel implements Importable { public void isValid() { if (this.active && this.startDate == null) throw new DataException("supported.programs.invalid"); } ProgramSupported(Long programId, Boolean active, Date startDate); }
ProgramSupported extends BaseModel implements Importable { public void isValid() { if (this.active && this.startDate == null) throw new DataException("supported.programs.invalid"); } ProgramSupported(Long programId, Boolean active, Date startDate); void isValid(); @SuppressWarnings("unused") String getStringStartDate(); @JsonIgnore Double getWhoRatioFor(final String productCode); @JsonIgnore Integer getPackSizeFor(final String productCode); }
ProgramSupported extends BaseModel implements Importable { public void isValid() { if (this.active && this.startDate == null) throw new DataException("supported.programs.invalid"); } ProgramSupported(Long programId, Boolean active, Date startDate); void isValid(); @SuppressWarnings("unused") String getStringStartDate(); @JsonIgnore Double getWhoRatioFor(final String productCode); @JsonIgnore Integer getPackSizeFor(final String productCode);  }