@Test(expectedExceptions = IllegalArgumentException.class) public void cantSetBadCountValue() { new MantaJobPhase() .setCount(0); }
public MantaJobPhase setCount(final Integer count) { if (getType() != null && !getType().equals("reduce")) { throw new IllegalArgumentException("Count can only be set for the reduce phase"); } if (count != null && count < 1) { throw new IllegalArgumentException("Count must be null or greater than 1"); } this.count = count; return this; }
MantaJobPhase { public MantaJobPhase setCount(final Integer count) { if (getType() != null && !getType().equals("reduce")) { throw new IllegalArgumentException("Count can only be set for the reduce phase"); } if (count != null && count < 1) { throw new IllegalArgumentException("Count must be null or greater than 1"); } this.count = count; return this; } }
MantaJobPhase { public MantaJobPhase setCount(final Integer count) { if (getType() != null && !getType().equals("reduce")) { throw new IllegalArgumentException("Count can only be set for the reduce phase"); } if (count != null && count < 1) { throw new IllegalArgumentException("Count must be null or greater than 1"); } this.count = count; return this; } MantaJobPhase(); }
MantaJobPhase { public MantaJobPhase setCount(final Integer count) { if (getType() != null && !getType().equals("reduce")) { throw new IllegalArgumentException("Count can only be set for the reduce phase"); } if (count != null && count < 1) { throw new IllegalArgumentException("Count must be null or greater than 1"); } this.count = count; return this; } MantaJobPhase(); String getExec(); MantaJobPhase setExec(final String exec); String getType(); MantaJobPhase setType(final String type); List<String> getAssets(); MantaJobPhase setAssets(final List<String> assets); String getInit(); MantaJobPhase setInit(final String init); Integer getCount(); MantaJobPhase setCount(final Integer count); Integer getMemory(); MantaJobPhase setMemory(final Integer memory); Integer getDisk(); MantaJobPhase setDisk(final Integer disk); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); }
MantaJobPhase { public MantaJobPhase setCount(final Integer count) { if (getType() != null && !getType().equals("reduce")) { throw new IllegalArgumentException("Count can only be set for the reduce phase"); } if (count != null && count < 1) { throw new IllegalArgumentException("Count must be null or greater than 1"); } this.count = count; return this; } MantaJobPhase(); String getExec(); MantaJobPhase setExec(final String exec); String getType(); MantaJobPhase setType(final String type); List<String> getAssets(); MantaJobPhase setAssets(final List<String> assets); String getInit(); MantaJobPhase setInit(final String init); Integer getCount(); MantaJobPhase setCount(final Integer count); Integer getMemory(); MantaJobPhase setMemory(final Integer memory); Integer getDisk(); MantaJobPhase setDisk(final Integer disk); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }