@Test public void checkBetaDirectionIsPresent() throws Exception { assertThat(validationChecks.checkBetaDirectionIsPresent("increase")).isNull(); assertThat(validationChecks.checkBetaDirectionIsPresent("decrease")).isNull(); assertThat(validationChecks.checkBetaDirectionIsPresent("some other value")).isEqualTo( "Value is not increase or decrease"); assertThat(validationChecks.checkBetaDirectionIsPresent(null)).isEqualTo("Value is empty"); }
public String checkBetaDirectionIsPresent(String value) { String error = null; if (value == null) { error = "Value is empty"; } else { switch (value) { case "increase": break; case "decrease": break; default: error = "Value is not increase or decrease"; } } return error; }
ValidationChecks { public String checkBetaDirectionIsPresent(String value) { String error = null; if (value == null) { error = "Value is empty"; } else { switch (value) { case "increase": break; case "decrease": break; default: error = "Value is not increase or decrease"; } } return error; } }
ValidationChecks { public String checkBetaDirectionIsPresent(String value) { String error = null; if (value == null) { error = "Value is empty"; } else { switch (value) { case "increase": break; case "decrease": break; default: error = "Value is not increase or decrease"; } } return error; } @Autowired  ValidationChecks(GeneCheckingRestService geneCheckingRestService,
                            SnpCheckingRestService snpCheckingRestService); }
ValidationChecks { public String checkBetaDirectionIsPresent(String value) { String error = null; if (value == null) { error = "Value is empty"; } else { switch (value) { case "increase": break; case "decrease": break; default: error = "Value is not increase or decrease"; } } return error; } @Autowired  ValidationChecks(GeneCheckingRestService geneCheckingRestService,
                            SnpCheckingRestService snpCheckingRestService); String checkValueIsPresent(String value); String checkValueIsEmpty(String value); String checkValueIsEmpty(Float value); String checkSnpType(String value); String checkOrIsPresent(Float value); String checkOrRecipIsPresentAndLessThanOne(Float value); String checkOrAndOrRecip(Float or, Float orRecip); String checkBetaIsPresentAndIsNotNegative(Float value); String checkBetaDirectionIsPresent(String value); String checkMantissaIsLessThan10(Integer value); String checkExponentIsPresentAndNegative(Integer value); String checkGene(String geneName, String eRelease); String checkSnp(String snp, String eRelease); String checkSnpGeneLocation(String snp, String gene, String eRelease); String checkRiskAllele(String riskAlleleName); String checkRiskFrequency(String riskFrequency); String checkSynthax(String value, String delimiter); String checkSnpStatus(Boolean genomeWide, Boolean limitedList); }
ValidationChecks { public String checkBetaDirectionIsPresent(String value) { String error = null; if (value == null) { error = "Value is empty"; } else { switch (value) { case "increase": break; case "decrease": break; default: error = "Value is not increase or decrease"; } } return error; } @Autowired  ValidationChecks(GeneCheckingRestService geneCheckingRestService,
                            SnpCheckingRestService snpCheckingRestService); String checkValueIsPresent(String value); String checkValueIsEmpty(String value); String checkValueIsEmpty(Float value); String checkSnpType(String value); String checkOrIsPresent(Float value); String checkOrRecipIsPresentAndLessThanOne(Float value); String checkOrAndOrRecip(Float or, Float orRecip); String checkBetaIsPresentAndIsNotNegative(Float value); String checkBetaDirectionIsPresent(String value); String checkMantissaIsLessThan10(Integer value); String checkExponentIsPresentAndNegative(Integer value); String checkGene(String geneName, String eRelease); String checkSnp(String snp, String eRelease); String checkSnpGeneLocation(String snp, String gene, String eRelease); String checkRiskAllele(String riskAlleleName); String checkRiskFrequency(String riskFrequency); String checkSynthax(String value, String delimiter); String checkSnpStatus(Boolean genomeWide, Boolean limitedList);  }