target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public final void testAccentRemoval_MixedWithUnusualChars_SuccessfullyRemovedAndUnusualcharactersInvariant() { assertEquals("A-e'i.,o&u", this.getStringEncoder().removeAccents("Á-e'í.,ó&ú")); }
String removeAccents(final String accentedWord) { if (accentedWord == null) { return null; } final StringBuilder sb = new StringBuilder(); final int n = accentedWord.length(); for (int i = 0; i < n; i++) { final char c = accentedWord.charAt(i); final int pos = UNICODE.indexOf(c); if (pos > -1) { sb.append(PLAIN_ASCII.c...
MatchRatingApproachEncoder implements StringEncoder { String removeAccents(final String accentedWord) { if (accentedWord == null) { return null; } final StringBuilder sb = new StringBuilder(); final int n = accentedWord.length(); for (int i = 0; i < n; i++) { final char c = accentedWord.charAt(i); final int pos = UNICO...
MatchRatingApproachEncoder implements StringEncoder { String removeAccents(final String accentedWord) { if (accentedWord == null) { return null; } final StringBuilder sb = new StringBuilder(); final int n = accentedWord.length(); for (int i = 0; i < n; i++) { final char c = accentedWord.charAt(i); final int pos = UNICO...
MatchRatingApproachEncoder implements StringEncoder { String removeAccents(final String accentedWord) { if (accentedWord == null) { return null; } final StringBuilder sb = new StringBuilder(); final int n = accentedWord.length(); for (int i = 0; i < n; i++) { final char c = accentedWord.charAt(i); final int pos = UNICO...
MatchRatingApproachEncoder implements StringEncoder { String removeAccents(final String accentedWord) { if (accentedWord == null) { return null; } final StringBuilder sb = new StringBuilder(); final int n = accentedWord.length(); for (int i = 0; i < n; i++) { final char c = accentedWord.charAt(i); final int pos = UNICO...
@Test public final void testAccentRemoval_ComprehensiveAccentMix_AllSuccessfullyRemoved() { assertEquals("E,E,E,E,U,U,I,I,A,A,O,e,e,e,e,u,u,i,i,a,a,o,c", this.getStringEncoder().removeAccents("È,É,Ê,Ë,Û,Ù,Ï,Î,À,Â,Ô,è,é,ê,ë,û,ù,ï,î,à,â,ô,ç")); }
String removeAccents(final String accentedWord) { if (accentedWord == null) { return null; } final StringBuilder sb = new StringBuilder(); final int n = accentedWord.length(); for (int i = 0; i < n; i++) { final char c = accentedWord.charAt(i); final int pos = UNICODE.indexOf(c); if (pos > -1) { sb.append(PLAIN_ASCII.c...
MatchRatingApproachEncoder implements StringEncoder { String removeAccents(final String accentedWord) { if (accentedWord == null) { return null; } final StringBuilder sb = new StringBuilder(); final int n = accentedWord.length(); for (int i = 0; i < n; i++) { final char c = accentedWord.charAt(i); final int pos = UNICO...
MatchRatingApproachEncoder implements StringEncoder { String removeAccents(final String accentedWord) { if (accentedWord == null) { return null; } final StringBuilder sb = new StringBuilder(); final int n = accentedWord.length(); for (int i = 0; i < n; i++) { final char c = accentedWord.charAt(i); final int pos = UNICO...
MatchRatingApproachEncoder implements StringEncoder { String removeAccents(final String accentedWord) { if (accentedWord == null) { return null; } final StringBuilder sb = new StringBuilder(); final int n = accentedWord.length(); for (int i = 0; i < n; i++) { final char c = accentedWord.charAt(i); final int pos = UNICO...
MatchRatingApproachEncoder implements StringEncoder { String removeAccents(final String accentedWord) { if (accentedWord == null) { return null; } final StringBuilder sb = new StringBuilder(); final int n = accentedWord.length(); for (int i = 0; i < n; i++) { final char c = accentedWord.charAt(i); final int pos = UNICO...
@Test public final void testAccentRemovalNormalString_NoChange() { assertEquals("Colorless green ideas sleep furiously", this.getStringEncoder().removeAccents("Colorless green ideas sleep furiously")); }
String removeAccents(final String accentedWord) { if (accentedWord == null) { return null; } final StringBuilder sb = new StringBuilder(); final int n = accentedWord.length(); for (int i = 0; i < n; i++) { final char c = accentedWord.charAt(i); final int pos = UNICODE.indexOf(c); if (pos > -1) { sb.append(PLAIN_ASCII.c...
MatchRatingApproachEncoder implements StringEncoder { String removeAccents(final String accentedWord) { if (accentedWord == null) { return null; } final StringBuilder sb = new StringBuilder(); final int n = accentedWord.length(); for (int i = 0; i < n; i++) { final char c = accentedWord.charAt(i); final int pos = UNICO...
MatchRatingApproachEncoder implements StringEncoder { String removeAccents(final String accentedWord) { if (accentedWord == null) { return null; } final StringBuilder sb = new StringBuilder(); final int n = accentedWord.length(); for (int i = 0; i < n; i++) { final char c = accentedWord.charAt(i); final int pos = UNICO...
MatchRatingApproachEncoder implements StringEncoder { String removeAccents(final String accentedWord) { if (accentedWord == null) { return null; } final StringBuilder sb = new StringBuilder(); final int n = accentedWord.length(); for (int i = 0; i < n; i++) { final char c = accentedWord.charAt(i); final int pos = UNICO...
MatchRatingApproachEncoder implements StringEncoder { String removeAccents(final String accentedWord) { if (accentedWord == null) { return null; } final StringBuilder sb = new StringBuilder(); final int n = accentedWord.length(); for (int i = 0; i < n; i++) { final char c = accentedWord.charAt(i); final int pos = UNICO...
@Test public final void testAccentRemoval_NINO_NoChange() { assertEquals("", this.getStringEncoder().removeAccents("")); }
String removeAccents(final String accentedWord) { if (accentedWord == null) { return null; } final StringBuilder sb = new StringBuilder(); final int n = accentedWord.length(); for (int i = 0; i < n; i++) { final char c = accentedWord.charAt(i); final int pos = UNICODE.indexOf(c); if (pos > -1) { sb.append(PLAIN_ASCII.c...
MatchRatingApproachEncoder implements StringEncoder { String removeAccents(final String accentedWord) { if (accentedWord == null) { return null; } final StringBuilder sb = new StringBuilder(); final int n = accentedWord.length(); for (int i = 0; i < n; i++) { final char c = accentedWord.charAt(i); final int pos = UNICO...
MatchRatingApproachEncoder implements StringEncoder { String removeAccents(final String accentedWord) { if (accentedWord == null) { return null; } final StringBuilder sb = new StringBuilder(); final int n = accentedWord.length(); for (int i = 0; i < n; i++) { final char c = accentedWord.charAt(i); final int pos = UNICO...
MatchRatingApproachEncoder implements StringEncoder { String removeAccents(final String accentedWord) { if (accentedWord == null) { return null; } final StringBuilder sb = new StringBuilder(); final int n = accentedWord.length(); for (int i = 0; i < n; i++) { final char c = accentedWord.charAt(i); final int pos = UNICO...
MatchRatingApproachEncoder implements StringEncoder { String removeAccents(final String accentedWord) { if (accentedWord == null) { return null; } final StringBuilder sb = new StringBuilder(); final int n = accentedWord.length(); for (int i = 0; i < n; i++) { final char c = accentedWord.charAt(i); final int pos = UNICO...
@Test public final void testAccentRemoval_NullValue_ReturnNullSuccessfully() { assertEquals(null, this.getStringEncoder().removeAccents(null)); }
String removeAccents(final String accentedWord) { if (accentedWord == null) { return null; } final StringBuilder sb = new StringBuilder(); final int n = accentedWord.length(); for (int i = 0; i < n; i++) { final char c = accentedWord.charAt(i); final int pos = UNICODE.indexOf(c); if (pos > -1) { sb.append(PLAIN_ASCII.c...
MatchRatingApproachEncoder implements StringEncoder { String removeAccents(final String accentedWord) { if (accentedWord == null) { return null; } final StringBuilder sb = new StringBuilder(); final int n = accentedWord.length(); for (int i = 0; i < n; i++) { final char c = accentedWord.charAt(i); final int pos = UNICO...
MatchRatingApproachEncoder implements StringEncoder { String removeAccents(final String accentedWord) { if (accentedWord == null) { return null; } final StringBuilder sb = new StringBuilder(); final int n = accentedWord.length(); for (int i = 0; i < n; i++) { final char c = accentedWord.charAt(i); final int pos = UNICO...
MatchRatingApproachEncoder implements StringEncoder { String removeAccents(final String accentedWord) { if (accentedWord == null) { return null; } final StringBuilder sb = new StringBuilder(); final int n = accentedWord.length(); for (int i = 0; i < n; i++) { final char c = accentedWord.charAt(i); final int pos = UNICO...
MatchRatingApproachEncoder implements StringEncoder { String removeAccents(final String accentedWord) { if (accentedWord == null) { return null; } final StringBuilder sb = new StringBuilder(); final int n = accentedWord.length(); for (int i = 0; i < n; i++) { final char c = accentedWord.charAt(i); final int pos = UNICO...
@Test public void testIfElseIf2() throws Exception { String sql = "select where 1=1" + "#if(:1>0)" + " and id>:1" + "#elseif(:1<0)" + " and id<:1" + "#end"; ASTRootNode n = new Parser(sql).parse().init(); ParameterContext ctx = getParameterContext(Lists.newArrayList((Type) Integer.class)); n.checkAndBind(ctx); Invocati...
final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); jjtn00...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
@Test public final void testRemoveSingleDoubleConsonants_BUBLE_RemovedSuccessfully() { assertEquals("BUBLE", this.getStringEncoder().removeDoubleConsonants("BUBBLE")); }
String removeDoubleConsonants(final String name) { String replacedName = name.toUpperCase(); for (final String dc : DOUBLE_CONSONANT) { if (replacedName.contains(dc)) { final String singleLetter = dc.substring(0, 1); replacedName = replacedName.replace(dc, singleLetter); } } return replacedName; }
MatchRatingApproachEncoder implements StringEncoder { String removeDoubleConsonants(final String name) { String replacedName = name.toUpperCase(); for (final String dc : DOUBLE_CONSONANT) { if (replacedName.contains(dc)) { final String singleLetter = dc.substring(0, 1); replacedName = replacedName.replace(dc, singleLet...
MatchRatingApproachEncoder implements StringEncoder { String removeDoubleConsonants(final String name) { String replacedName = name.toUpperCase(); for (final String dc : DOUBLE_CONSONANT) { if (replacedName.contains(dc)) { final String singleLetter = dc.substring(0, 1); replacedName = replacedName.replace(dc, singleLet...
MatchRatingApproachEncoder implements StringEncoder { String removeDoubleConsonants(final String name) { String replacedName = name.toUpperCase(); for (final String dc : DOUBLE_CONSONANT) { if (replacedName.contains(dc)) { final String singleLetter = dc.substring(0, 1); replacedName = replacedName.replace(dc, singleLet...
MatchRatingApproachEncoder implements StringEncoder { String removeDoubleConsonants(final String name) { String replacedName = name.toUpperCase(); for (final String dc : DOUBLE_CONSONANT) { if (replacedName.contains(dc)) { final String singleLetter = dc.substring(0, 1); replacedName = replacedName.replace(dc, singleLet...
@Test public final void testRemoveDoubleConsonants_MISSISSIPPI_RemovedSuccessfully() { assertEquals("MISISIPI", this.getStringEncoder().removeDoubleConsonants("MISSISSIPPI")); }
String removeDoubleConsonants(final String name) { String replacedName = name.toUpperCase(); for (final String dc : DOUBLE_CONSONANT) { if (replacedName.contains(dc)) { final String singleLetter = dc.substring(0, 1); replacedName = replacedName.replace(dc, singleLetter); } } return replacedName; }
MatchRatingApproachEncoder implements StringEncoder { String removeDoubleConsonants(final String name) { String replacedName = name.toUpperCase(); for (final String dc : DOUBLE_CONSONANT) { if (replacedName.contains(dc)) { final String singleLetter = dc.substring(0, 1); replacedName = replacedName.replace(dc, singleLet...
MatchRatingApproachEncoder implements StringEncoder { String removeDoubleConsonants(final String name) { String replacedName = name.toUpperCase(); for (final String dc : DOUBLE_CONSONANT) { if (replacedName.contains(dc)) { final String singleLetter = dc.substring(0, 1); replacedName = replacedName.replace(dc, singleLet...
MatchRatingApproachEncoder implements StringEncoder { String removeDoubleConsonants(final String name) { String replacedName = name.toUpperCase(); for (final String dc : DOUBLE_CONSONANT) { if (replacedName.contains(dc)) { final String singleLetter = dc.substring(0, 1); replacedName = replacedName.replace(dc, singleLet...
MatchRatingApproachEncoder implements StringEncoder { String removeDoubleConsonants(final String name) { String replacedName = name.toUpperCase(); for (final String dc : DOUBLE_CONSONANT) { if (replacedName.contains(dc)) { final String singleLetter = dc.substring(0, 1); replacedName = replacedName.replace(dc, singleLet...
@Test public final void testRemoveDoubleDoubleVowel_BEETLE_NotRemoved() { assertEquals("BEETLE", this.getStringEncoder().removeDoubleConsonants("BEETLE")); }
String removeDoubleConsonants(final String name) { String replacedName = name.toUpperCase(); for (final String dc : DOUBLE_CONSONANT) { if (replacedName.contains(dc)) { final String singleLetter = dc.substring(0, 1); replacedName = replacedName.replace(dc, singleLetter); } } return replacedName; }
MatchRatingApproachEncoder implements StringEncoder { String removeDoubleConsonants(final String name) { String replacedName = name.toUpperCase(); for (final String dc : DOUBLE_CONSONANT) { if (replacedName.contains(dc)) { final String singleLetter = dc.substring(0, 1); replacedName = replacedName.replace(dc, singleLet...
MatchRatingApproachEncoder implements StringEncoder { String removeDoubleConsonants(final String name) { String replacedName = name.toUpperCase(); for (final String dc : DOUBLE_CONSONANT) { if (replacedName.contains(dc)) { final String singleLetter = dc.substring(0, 1); replacedName = replacedName.replace(dc, singleLet...
MatchRatingApproachEncoder implements StringEncoder { String removeDoubleConsonants(final String name) { String replacedName = name.toUpperCase(); for (final String dc : DOUBLE_CONSONANT) { if (replacedName.contains(dc)) { final String singleLetter = dc.substring(0, 1); replacedName = replacedName.replace(dc, singleLet...
MatchRatingApproachEncoder implements StringEncoder { String removeDoubleConsonants(final String name) { String replacedName = name.toUpperCase(); for (final String dc : DOUBLE_CONSONANT) { if (replacedName.contains(dc)) { final String singleLetter = dc.substring(0, 1); replacedName = replacedName.replace(dc, singleLet...
@Test public final void testIsVowel_CapitalA_ReturnsTrue() { assertTrue(this.getStringEncoder().isVowel("A")); }
boolean isVowel(final String letter) { return letter.equalsIgnoreCase("E") || letter.equalsIgnoreCase("A") || letter.equalsIgnoreCase("O") || letter.equalsIgnoreCase("I") || letter.equalsIgnoreCase("U"); }
MatchRatingApproachEncoder implements StringEncoder { boolean isVowel(final String letter) { return letter.equalsIgnoreCase("E") || letter.equalsIgnoreCase("A") || letter.equalsIgnoreCase("O") || letter.equalsIgnoreCase("I") || letter.equalsIgnoreCase("U"); } }
MatchRatingApproachEncoder implements StringEncoder { boolean isVowel(final String letter) { return letter.equalsIgnoreCase("E") || letter.equalsIgnoreCase("A") || letter.equalsIgnoreCase("O") || letter.equalsIgnoreCase("I") || letter.equalsIgnoreCase("U"); } }
MatchRatingApproachEncoder implements StringEncoder { boolean isVowel(final String letter) { return letter.equalsIgnoreCase("E") || letter.equalsIgnoreCase("A") || letter.equalsIgnoreCase("O") || letter.equalsIgnoreCase("I") || letter.equalsIgnoreCase("U"); } @Override final Object encode(final Object pObject); @Overr...
MatchRatingApproachEncoder implements StringEncoder { boolean isVowel(final String letter) { return letter.equalsIgnoreCase("E") || letter.equalsIgnoreCase("A") || letter.equalsIgnoreCase("O") || letter.equalsIgnoreCase("I") || letter.equalsIgnoreCase("U"); } @Override final Object encode(final Object pObject); @Overr...
@Test public final void testIsVowel_SmallD_ReturnsFalse() { assertFalse(this.getStringEncoder().isVowel("d")); }
boolean isVowel(final String letter) { return letter.equalsIgnoreCase("E") || letter.equalsIgnoreCase("A") || letter.equalsIgnoreCase("O") || letter.equalsIgnoreCase("I") || letter.equalsIgnoreCase("U"); }
MatchRatingApproachEncoder implements StringEncoder { boolean isVowel(final String letter) { return letter.equalsIgnoreCase("E") || letter.equalsIgnoreCase("A") || letter.equalsIgnoreCase("O") || letter.equalsIgnoreCase("I") || letter.equalsIgnoreCase("U"); } }
MatchRatingApproachEncoder implements StringEncoder { boolean isVowel(final String letter) { return letter.equalsIgnoreCase("E") || letter.equalsIgnoreCase("A") || letter.equalsIgnoreCase("O") || letter.equalsIgnoreCase("I") || letter.equalsIgnoreCase("U"); } }
MatchRatingApproachEncoder implements StringEncoder { boolean isVowel(final String letter) { return letter.equalsIgnoreCase("E") || letter.equalsIgnoreCase("A") || letter.equalsIgnoreCase("O") || letter.equalsIgnoreCase("I") || letter.equalsIgnoreCase("U"); } @Override final Object encode(final Object pObject); @Overr...
MatchRatingApproachEncoder implements StringEncoder { boolean isVowel(final String letter) { return letter.equalsIgnoreCase("E") || letter.equalsIgnoreCase("A") || letter.equalsIgnoreCase("O") || letter.equalsIgnoreCase("I") || letter.equalsIgnoreCase("U"); } @Override final Object encode(final Object pObject); @Overr...
@Test public final void testRemoveVowel_ALESSANDRA_Returns_ALSSNDR() { assertEquals("ALSSNDR", this.getStringEncoder().removeVowels("ALESSANDRA")); }
String removeVowels(String name) { final String firstLetter = name.substring(0, 1); name = name.replaceAll("A", EMPTY); name = name.replaceAll("E", EMPTY); name = name.replaceAll("I", EMPTY); name = name.replaceAll("O", EMPTY); name = name.replaceAll("U", EMPTY); name = name.replaceAll("\\s{2,}\\b", SPACE); if (isVowel...
MatchRatingApproachEncoder implements StringEncoder { String removeVowels(String name) { final String firstLetter = name.substring(0, 1); name = name.replaceAll("A", EMPTY); name = name.replaceAll("E", EMPTY); name = name.replaceAll("I", EMPTY); name = name.replaceAll("O", EMPTY); name = name.replaceAll("U", EMPTY); na...
MatchRatingApproachEncoder implements StringEncoder { String removeVowels(String name) { final String firstLetter = name.substring(0, 1); name = name.replaceAll("A", EMPTY); name = name.replaceAll("E", EMPTY); name = name.replaceAll("I", EMPTY); name = name.replaceAll("O", EMPTY); name = name.replaceAll("U", EMPTY); na...
MatchRatingApproachEncoder implements StringEncoder { String removeVowels(String name) { final String firstLetter = name.substring(0, 1); name = name.replaceAll("A", EMPTY); name = name.replaceAll("E", EMPTY); name = name.replaceAll("I", EMPTY); name = name.replaceAll("O", EMPTY); name = name.replaceAll("U", EMPTY); na...
MatchRatingApproachEncoder implements StringEncoder { String removeVowels(String name) { final String firstLetter = name.substring(0, 1); name = name.replaceAll("A", EMPTY); name = name.replaceAll("E", EMPTY); name = name.replaceAll("I", EMPTY); name = name.replaceAll("O", EMPTY); name = name.replaceAll("U", EMPTY); na...
@Test public final void testRemoveVowel__AIDAN_Returns_ADN() { assertEquals("ADN", this.getStringEncoder().removeVowels("AIDAN")); }
String removeVowels(String name) { final String firstLetter = name.substring(0, 1); name = name.replaceAll("A", EMPTY); name = name.replaceAll("E", EMPTY); name = name.replaceAll("I", EMPTY); name = name.replaceAll("O", EMPTY); name = name.replaceAll("U", EMPTY); name = name.replaceAll("\\s{2,}\\b", SPACE); if (isVowel...
MatchRatingApproachEncoder implements StringEncoder { String removeVowels(String name) { final String firstLetter = name.substring(0, 1); name = name.replaceAll("A", EMPTY); name = name.replaceAll("E", EMPTY); name = name.replaceAll("I", EMPTY); name = name.replaceAll("O", EMPTY); name = name.replaceAll("U", EMPTY); na...
MatchRatingApproachEncoder implements StringEncoder { String removeVowels(String name) { final String firstLetter = name.substring(0, 1); name = name.replaceAll("A", EMPTY); name = name.replaceAll("E", EMPTY); name = name.replaceAll("I", EMPTY); name = name.replaceAll("O", EMPTY); name = name.replaceAll("U", EMPTY); na...
MatchRatingApproachEncoder implements StringEncoder { String removeVowels(String name) { final String firstLetter = name.substring(0, 1); name = name.replaceAll("A", EMPTY); name = name.replaceAll("E", EMPTY); name = name.replaceAll("I", EMPTY); name = name.replaceAll("O", EMPTY); name = name.replaceAll("U", EMPTY); na...
MatchRatingApproachEncoder implements StringEncoder { String removeVowels(String name) { final String firstLetter = name.substring(0, 1); name = name.replaceAll("A", EMPTY); name = name.replaceAll("E", EMPTY); name = name.replaceAll("I", EMPTY); name = name.replaceAll("O", EMPTY); name = name.replaceAll("U", EMPTY); na...
@Test public final void testRemoveVowel__DECLAN_Returns_DCLN() { assertEquals("DCLN", this.getStringEncoder().removeVowels("DECLAN")); }
String removeVowels(String name) { final String firstLetter = name.substring(0, 1); name = name.replaceAll("A", EMPTY); name = name.replaceAll("E", EMPTY); name = name.replaceAll("I", EMPTY); name = name.replaceAll("O", EMPTY); name = name.replaceAll("U", EMPTY); name = name.replaceAll("\\s{2,}\\b", SPACE); if (isVowel...
MatchRatingApproachEncoder implements StringEncoder { String removeVowels(String name) { final String firstLetter = name.substring(0, 1); name = name.replaceAll("A", EMPTY); name = name.replaceAll("E", EMPTY); name = name.replaceAll("I", EMPTY); name = name.replaceAll("O", EMPTY); name = name.replaceAll("U", EMPTY); na...
MatchRatingApproachEncoder implements StringEncoder { String removeVowels(String name) { final String firstLetter = name.substring(0, 1); name = name.replaceAll("A", EMPTY); name = name.replaceAll("E", EMPTY); name = name.replaceAll("I", EMPTY); name = name.replaceAll("O", EMPTY); name = name.replaceAll("U", EMPTY); na...
MatchRatingApproachEncoder implements StringEncoder { String removeVowels(String name) { final String firstLetter = name.substring(0, 1); name = name.replaceAll("A", EMPTY); name = name.replaceAll("E", EMPTY); name = name.replaceAll("I", EMPTY); name = name.replaceAll("O", EMPTY); name = name.replaceAll("U", EMPTY); na...
MatchRatingApproachEncoder implements StringEncoder { String removeVowels(String name) { final String firstLetter = name.substring(0, 1); name = name.replaceAll("A", EMPTY); name = name.replaceAll("E", EMPTY); name = name.replaceAll("I", EMPTY); name = name.replaceAll("O", EMPTY); name = name.replaceAll("U", EMPTY); na...
@Test public final void testGetFirstLast3__ALEXANDER_Returns_Aleder() { assertEquals("Aleder", this.getStringEncoder().getFirst3Last3("Alexzander")); }
String getFirst3Last3(final String name) { final int nameLength = name.length(); if (nameLength > SIX) { final String firstThree = name.substring(0, THREE); final String lastThree = name.substring(nameLength - THREE, nameLength); return firstThree + lastThree; } else { return name; } }
MatchRatingApproachEncoder implements StringEncoder { String getFirst3Last3(final String name) { final int nameLength = name.length(); if (nameLength > SIX) { final String firstThree = name.substring(0, THREE); final String lastThree = name.substring(nameLength - THREE, nameLength); return firstThree + lastThree; } els...
MatchRatingApproachEncoder implements StringEncoder { String getFirst3Last3(final String name) { final int nameLength = name.length(); if (nameLength > SIX) { final String firstThree = name.substring(0, THREE); final String lastThree = name.substring(nameLength - THREE, nameLength); return firstThree + lastThree; } els...
MatchRatingApproachEncoder implements StringEncoder { String getFirst3Last3(final String name) { final int nameLength = name.length(); if (nameLength > SIX) { final String firstThree = name.substring(0, THREE); final String lastThree = name.substring(nameLength - THREE, nameLength); return firstThree + lastThree; } els...
MatchRatingApproachEncoder implements StringEncoder { String getFirst3Last3(final String name) { final int nameLength = name.length(); if (nameLength > SIX) { final String firstThree = name.substring(0, THREE); final String lastThree = name.substring(nameLength - THREE, nameLength); return firstThree + lastThree; } els...
@Test public final void testGetFirstLast3_PETE_Returns_PETE() { assertEquals("PETE", this.getStringEncoder().getFirst3Last3("PETE")); }
String getFirst3Last3(final String name) { final int nameLength = name.length(); if (nameLength > SIX) { final String firstThree = name.substring(0, THREE); final String lastThree = name.substring(nameLength - THREE, nameLength); return firstThree + lastThree; } else { return name; } }
MatchRatingApproachEncoder implements StringEncoder { String getFirst3Last3(final String name) { final int nameLength = name.length(); if (nameLength > SIX) { final String firstThree = name.substring(0, THREE); final String lastThree = name.substring(nameLength - THREE, nameLength); return firstThree + lastThree; } els...
MatchRatingApproachEncoder implements StringEncoder { String getFirst3Last3(final String name) { final int nameLength = name.length(); if (nameLength > SIX) { final String firstThree = name.substring(0, THREE); final String lastThree = name.substring(nameLength - THREE, nameLength); return firstThree + lastThree; } els...
MatchRatingApproachEncoder implements StringEncoder { String getFirst3Last3(final String name) { final int nameLength = name.length(); if (nameLength > SIX) { final String firstThree = name.substring(0, THREE); final String lastThree = name.substring(nameLength - THREE, nameLength); return firstThree + lastThree; } els...
MatchRatingApproachEncoder implements StringEncoder { String getFirst3Last3(final String name) { final int nameLength = name.length(); if (nameLength > SIX) { final String firstThree = name.substring(0, THREE); final String lastThree = name.substring(nameLength - THREE, nameLength); return firstThree + lastThree; } els...
@Test public void testIfElseIfElse() throws Exception { String sql = "select where 1=1" + "#if(:1>0)" + " and id>:1" + "#elseif(:1<0)" + " and id<:1" + "#else" + " and id=:1" + "#end"; ASTRootNode n = new Parser(sql).parse().init(); ParameterContext ctx = getParameterContext(Lists.newArrayList((Type) Integer.class)); n...
final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); jjtn00...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
@Test public final void testleftTorightThenRightToLeft_ALEXANDER_ALEXANDRA_Returns4() { assertEquals(4, this.getStringEncoder().leftToRightThenRightToLeftProcessing("ALEXANDER", "ALEXANDRA")); }
int leftToRightThenRightToLeftProcessing(final String name1, final String name2) { final char[] name1Char = name1.toCharArray(); final char[] name2Char = name2.toCharArray(); final int name1Size = name1.length() - 1; final int name2Size = name2.length() - 1; String name1LtRStart = EMPTY; String name1LtREnd = EMPTY; Str...
MatchRatingApproachEncoder implements StringEncoder { int leftToRightThenRightToLeftProcessing(final String name1, final String name2) { final char[] name1Char = name1.toCharArray(); final char[] name2Char = name2.toCharArray(); final int name1Size = name1.length() - 1; final int name2Size = name2.length() - 1; String ...
MatchRatingApproachEncoder implements StringEncoder { int leftToRightThenRightToLeftProcessing(final String name1, final String name2) { final char[] name1Char = name1.toCharArray(); final char[] name2Char = name2.toCharArray(); final int name1Size = name1.length() - 1; final int name2Size = name2.length() - 1; String ...
MatchRatingApproachEncoder implements StringEncoder { int leftToRightThenRightToLeftProcessing(final String name1, final String name2) { final char[] name1Char = name1.toCharArray(); final char[] name2Char = name2.toCharArray(); final int name1Size = name1.length() - 1; final int name2Size = name2.length() - 1; String ...
MatchRatingApproachEncoder implements StringEncoder { int leftToRightThenRightToLeftProcessing(final String name1, final String name2) { final char[] name1Char = name1.toCharArray(); final char[] name2Char = name2.toCharArray(); final int name1Size = name1.length() - 1; final int name2Size = name2.length() - 1; String ...
@Test public final void testleftTorightThenRightToLeft_EINSTEIN_MICHAELA_Returns0() { assertEquals(0, this.getStringEncoder().leftToRightThenRightToLeftProcessing("EINSTEIN", "MICHAELA")); }
int leftToRightThenRightToLeftProcessing(final String name1, final String name2) { final char[] name1Char = name1.toCharArray(); final char[] name2Char = name2.toCharArray(); final int name1Size = name1.length() - 1; final int name2Size = name2.length() - 1; String name1LtRStart = EMPTY; String name1LtREnd = EMPTY; Str...
MatchRatingApproachEncoder implements StringEncoder { int leftToRightThenRightToLeftProcessing(final String name1, final String name2) { final char[] name1Char = name1.toCharArray(); final char[] name2Char = name2.toCharArray(); final int name1Size = name1.length() - 1; final int name2Size = name2.length() - 1; String ...
MatchRatingApproachEncoder implements StringEncoder { int leftToRightThenRightToLeftProcessing(final String name1, final String name2) { final char[] name1Char = name1.toCharArray(); final char[] name2Char = name2.toCharArray(); final int name1Size = name1.length() - 1; final int name2Size = name2.length() - 1; String ...
MatchRatingApproachEncoder implements StringEncoder { int leftToRightThenRightToLeftProcessing(final String name1, final String name2) { final char[] name1Char = name1.toCharArray(); final char[] name2Char = name2.toCharArray(); final int name1Size = name1.length() - 1; final int name2Size = name2.length() - 1; String ...
MatchRatingApproachEncoder implements StringEncoder { int leftToRightThenRightToLeftProcessing(final String name1, final String name2) { final char[] name1Char = name1.toCharArray(); final char[] name2Char = name2.toCharArray(); final int name1Size = name1.length() - 1; final int name2Size = name2.length() - 1; String ...
@Test public final void testGetMinRating_7_Return4_Successfully() { assertEquals(4, this.getStringEncoder().getMinRating(7)); }
int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLength == TWELVE) { minRating = TWO; } else { minRating =...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
@Test public final void testGetMinRating_1_Returns5_Successfully() { assertEquals(5, this.getStringEncoder().getMinRating(1)); }
int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLength == TWELVE) { minRating = TWO; } else { minRating =...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
@Test public final void testGetMinRating_2_Returns5_Successfully() { assertEquals(5, this.getStringEncoder().getMinRating(2)); }
int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLength == TWELVE) { minRating = TWO; } else { minRating =...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
@Test public final void testgetMinRating_5_Returns4_Successfully(){ assertEquals(4, this.getStringEncoder().getMinRating(5)); }
int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLength == TWELVE) { minRating = TWO; } else { minRating =...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
@Test public final void testgetMinRating_5_Returns4_Successfully2(){ assertEquals(4, this.getStringEncoder().getMinRating(5)); }
int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLength == TWELVE) { minRating = TWO; } else { minRating =...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
@Test public final void testgetMinRating_6_Returns4_Successfully(){ assertEquals(4, this.getStringEncoder().getMinRating(6)); }
int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLength == TWELVE) { minRating = TWO; } else { minRating =...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
@Test public final void testgetMinRating_7_Returns4_Successfully(){ assertEquals(4, this.getStringEncoder().getMinRating(7)); }
int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLength == TWELVE) { minRating = TWO; } else { minRating =...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
@Test public final void testgetMinRating_8_Returns3_Successfully(){ assertEquals(3, this.getStringEncoder().getMinRating(8)); }
int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLength == TWELVE) { minRating = TWO; } else { minRating =...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
@Test public void testIfElseIfElse2() throws Exception { String sql = "select where 1=1" + "#if(:1>0)" + " and id>:1" + "#elseif(:1<0)" + " and id<:1" + "#else" + " and id=:1" + "#end"; ASTRootNode n = new Parser(sql).parse().init(); ParameterContext ctx = getParameterContext(Lists.newArrayList((Type) Integer.class)); ...
final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); jjtn00...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
@Test public final void testgetMinRating_10_Returns3_Successfully(){ assertEquals(3, this.getStringEncoder().getMinRating(10)); }
int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLength == TWELVE) { minRating = TWO; } else { minRating =...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
@Test public final void testgetMinRating_11_Returns_3_Successfully(){ assertEquals(3, this.getStringEncoder().getMinRating(11)); }
int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLength == TWELVE) { minRating = TWO; } else { minRating =...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
@Test public final void testGetMinRating_13_Returns_1_Successfully() { assertEquals(1, this.getStringEncoder().getMinRating(13)); }
int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLength == TWELVE) { minRating = TWO; } else { minRating =...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
MatchRatingApproachEncoder implements StringEncoder { int getMinRating(final int sumLength) { int minRating = 0; if (sumLength <= FOUR) { minRating = FIVE; } else if (sumLength >= FIVE && sumLength <= SEVEN) { minRating = FOUR; } else if (sumLength >= EIGHT && sumLength <= ELEVEN) { minRating = THREE; } else if (sumLen...
@Test public final void testcleanName_SuccessfullyClean() { assertEquals("THISISATEST", this.getStringEncoder().cleanName("This-ís a t.,es &t")); }
String cleanName(final String name) { String upperName = name.toUpperCase(Locale.ENGLISH); final String[] charsToTrim = { "\\-", "[&]", "\\'", "\\.", "[\\,]" }; for (final String str : charsToTrim) { upperName = upperName.replaceAll(str, EMPTY); } upperName = removeAccents(upperName); upperName = upperName.replaceAll("...
MatchRatingApproachEncoder implements StringEncoder { String cleanName(final String name) { String upperName = name.toUpperCase(Locale.ENGLISH); final String[] charsToTrim = { "\\-", "[&]", "\\'", "\\.", "[\\,]" }; for (final String str : charsToTrim) { upperName = upperName.replaceAll(str, EMPTY); } upperName = remove...
MatchRatingApproachEncoder implements StringEncoder { String cleanName(final String name) { String upperName = name.toUpperCase(Locale.ENGLISH); final String[] charsToTrim = { "\\-", "[&]", "\\'", "\\.", "[\\,]" }; for (final String str : charsToTrim) { upperName = upperName.replaceAll(str, EMPTY); } upperName = remove...
MatchRatingApproachEncoder implements StringEncoder { String cleanName(final String name) { String upperName = name.toUpperCase(Locale.ENGLISH); final String[] charsToTrim = { "\\-", "[&]", "\\'", "\\.", "[\\,]" }; for (final String str : charsToTrim) { upperName = upperName.replaceAll(str, EMPTY); } upperName = remove...
MatchRatingApproachEncoder implements StringEncoder { String cleanName(final String name) { String upperName = name.toUpperCase(Locale.ENGLISH); final String[] charsToTrim = { "\\-", "[&]", "\\'", "\\.", "[\\,]" }; for (final String str : charsToTrim) { upperName = upperName.replaceAll(str, EMPTY); } upperName = remove...
@Test public final void testisVowel_SingleVowel_ReturnsTrue() { assertTrue(this.getStringEncoder().isVowel(("I"))); }
boolean isVowel(final String letter) { return letter.equalsIgnoreCase("E") || letter.equalsIgnoreCase("A") || letter.equalsIgnoreCase("O") || letter.equalsIgnoreCase("I") || letter.equalsIgnoreCase("U"); }
MatchRatingApproachEncoder implements StringEncoder { boolean isVowel(final String letter) { return letter.equalsIgnoreCase("E") || letter.equalsIgnoreCase("A") || letter.equalsIgnoreCase("O") || letter.equalsIgnoreCase("I") || letter.equalsIgnoreCase("U"); } }
MatchRatingApproachEncoder implements StringEncoder { boolean isVowel(final String letter) { return letter.equalsIgnoreCase("E") || letter.equalsIgnoreCase("A") || letter.equalsIgnoreCase("O") || letter.equalsIgnoreCase("I") || letter.equalsIgnoreCase("U"); } }
MatchRatingApproachEncoder implements StringEncoder { boolean isVowel(final String letter) { return letter.equalsIgnoreCase("E") || letter.equalsIgnoreCase("A") || letter.equalsIgnoreCase("O") || letter.equalsIgnoreCase("I") || letter.equalsIgnoreCase("U"); } @Override final Object encode(final Object pObject); @Overr...
MatchRatingApproachEncoder implements StringEncoder { boolean isVowel(final String letter) { return letter.equalsIgnoreCase("E") || letter.equalsIgnoreCase("A") || letter.equalsIgnoreCase("O") || letter.equalsIgnoreCase("I") || letter.equalsIgnoreCase("U"); } @Override final Object encode(final Object pObject); @Overr...
@Test public final void testisEncodeEquals_CornerCase_SecondNameNothing_ReturnsFalse() { assertFalse(this.getStringEncoder().isEncodeEquals("test", "")); }
public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return false; } else if (name1.length() == 1 || name2.length() ==...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
@Test public final void testisEncodeEquals_CornerCase_FirstNameNothing_ReturnsFalse() { assertFalse(this.getStringEncoder().isEncodeEquals("", "test")); }
public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return false; } else if (name1.length() == 1 || name2.length() ==...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
@Test public final void testisEncodeEquals_CornerCase_SecondNameJustSpace_ReturnsFalse() { assertFalse(this.getStringEncoder().isEncodeEquals("test", " ")); }
public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return false; } else if (name1.length() == 1 || name2.length() ==...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
@Test public final void testisEncodeEquals_CornerCase_FirstNameJustSpace_ReturnsFalse() { assertFalse(this.getStringEncoder().isEncodeEquals(" ", "test")); }
public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return false; } else if (name1.length() == 1 || name2.length() ==...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
@Test public final void testisEncodeEquals_CornerCase_SecondNameNull_ReturnsFalse() { assertFalse(this.getStringEncoder().isEncodeEquals("test", null)); }
public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return false; } else if (name1.length() == 1 || name2.length() ==...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
@Test public void testIfElseIfElse3() throws Exception { String sql = "select where 1=1" + "#if(:1>0)" + " and id>:1" + "#elseif(:1<0)" + " and id<:1" + "#else" + " and id=:1" + "#end"; ASTRootNode n = new Parser(sql).parse().init(); ParameterContext ctx = getParameterContext(Lists.newArrayList((Type) Integer.class)); ...
final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); jjtn00...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
@Test public final void testisEncodeEquals_CornerCase_FirstNameNull_ReturnsFalse() { assertFalse(this.getStringEncoder().isEncodeEquals(null, "test")); }
public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return false; } else if (name1.length() == 1 || name2.length() ==...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
@Test public final void testisEncodeEquals_CornerCase_FirstNameJust1Letter_ReturnsFalse() { assertFalse(this.getStringEncoder().isEncodeEquals("t", "test")); }
public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return false; } else if (name1.length() == 1 || name2.length() ==...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
@Test public final void testisEncodeEqualsSecondNameJust1Letter_ReturnsFalse() { assertFalse(this.getStringEncoder().isEncodeEquals("test", "t")); }
public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return false; } else if (name1.length() == 1 || name2.length() ==...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
MatchRatingApproachEncoder implements StringEncoder { public boolean isEncodeEquals(String name1, String name2) { if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) { return false; } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) { return fals...
@Test public final void testGetEncoding_HARPER_HRPR() { assertEquals("HRPR", this.getStringEncoder().encode("HARPER")); }
@Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObject); }
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
@Test public final void testGetEncoding_SMITH_to_SMTH() { assertEquals("SMTH", this.getStringEncoder().encode("Smith")); }
@Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObject); }
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
@Test public final void testGetEncoding_SMYTH_to_SMYTH() { assertEquals("SMYTH", this.getStringEncoder().encode("Smyth")); }
@Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObject); }
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
@Test public final void testGetEncoding_Space_to_Nothing() { assertEquals("", this.getStringEncoder().encode(" ")); }
@Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObject); }
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
@Test public final void testGetEncoding_NoSpace_to_Nothing() { assertEquals("", this.getStringEncoder().encode("")); }
@Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObject); }
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
@Test public final void testGetEncoding_Null_to_Nothing() { assertEquals("", this.getStringEncoder().encode(null)); }
@Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObject); }
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
@Test public final void testGetEncoding_One_Letter_to_Nothing() { assertEquals("", this.getStringEncoder().encode("E")); }
@Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObject); }
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObj...
@Test public void testExpression() throws Exception { String sql = "select where 1=1 #if(:1==false && :2!=null && :3==true) and id>10 #end"; ASTRootNode n = new Parser(sql).parse().init(); ParameterContext ctx = getParameterContext(Lists.newArrayList((Type) Boolean.class, Object.class, Boolean.class)); n.checkAndBind(c...
final public void Expression() throws ParseException { ASTExpression jjtn000 = new ASTExpression(JJTEXPRESSION); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { ConditionalOrExpression(); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjt...
Parser implements ParserTreeConstants, ParserConstants { final public void Expression() throws ParseException { ASTExpression jjtn000 = new ASTExpression(JJTEXPRESSION); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { ConditionalOrExpression(); } catch (Throwable jjte...
Parser implements ParserTreeConstants, ParserConstants { final public void Expression() throws ParseException { ASTExpression jjtn000 = new ASTExpression(JJTEXPRESSION); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { ConditionalOrExpression(); } catch (Throwable jjte...
Parser implements ParserTreeConstants, ParserConstants { final public void Expression() throws ParseException { ASTExpression jjtn000 = new ASTExpression(JJTEXPRESSION); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { ConditionalOrExpression(); } catch (Throwable jjte...
Parser implements ParserTreeConstants, ParserConstants { final public void Expression() throws ParseException { ASTExpression jjtn000 = new ASTExpression(JJTEXPRESSION); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { ConditionalOrExpression(); } catch (Throwable jjte...
@Test public void testGetAnnotations() throws Exception { Set<Annotation> annos = new HashSet<Annotation>(); Reflection.getAnnotations(SubDao.class, annos); assertThat(annos.size(), equalTo(1)); }
public static Set<Annotation> getAnnotations(Class<?> clazz) { Set<Annotation> annos = new HashSet<Annotation>(); getAnnotations(clazz, annos); return annos; }
Reflection { public static Set<Annotation> getAnnotations(Class<?> clazz) { Set<Annotation> annos = new HashSet<Annotation>(); getAnnotations(clazz, annos); return annos; } }
Reflection { public static Set<Annotation> getAnnotations(Class<?> clazz) { Set<Annotation> annos = new HashSet<Annotation>(); getAnnotations(clazz, annos); return annos; } }
Reflection { public static Set<Annotation> getAnnotations(Class<?> clazz) { Set<Annotation> annos = new HashSet<Annotation>(); getAnnotations(clazz, annos); return annos; } static T instantiate(Class<T> clazz); static T instantiateClass(Class<T> clazz); static T instantiateClass(Constructor<T> ctor, Object... args); s...
Reflection { public static Set<Annotation> getAnnotations(Class<?> clazz) { Set<Annotation> annos = new HashSet<Annotation>(); getAnnotations(clazz, annos); return annos; } static T instantiate(Class<T> clazz); static T instantiateClass(Class<T> clazz); static T instantiateClass(Constructor<T> ctor, Object... args); s...
@Test public void getProjectsByProviderConfigNameTest() throws Exception { ConfigurationModel configurationModel = createConfigurationModel(); ProviderProjectEntity providerProjectEntity = new ProviderProjectEntity(name, description, href, projectOwnerEmail, 1L); ConfigurationAccessor configurationAccessor = Mockito.mo...
@Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<ProviderProject> getProjectsByProviderConfigName(String providerConfigName) { try { Optional<Long> optionalConfigId = configurationAccessor.getProviderConfigurationByName(providerConfigName) .map(ConfigurationModel::getConfigura...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<ProviderProject> getProjectsByProviderConfigName(String providerConfigName) { try { Optional<Long> optionalConfigId = configurationAccessor.getProviderConfigurationBy...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<ProviderProject> getProjectsByProviderConfigName(String providerConfigName) { try { Optional<Long> optionalConfigId = configurationAccessor.getProviderConfigurationBy...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<ProviderProject> getProjectsByProviderConfigName(String providerConfigName) { try { Optional<Long> optionalConfigId = configurationAccessor.getProviderConfigurationBy...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<ProviderProject> getProjectsByProviderConfigName(String providerConfigName) { try { Optional<Long> optionalConfigId = configurationAccessor.getProviderConfigurationBy...
@Test public void setTaskPropertyExceptionTest() throws Exception { DefaultProviderTaskPropertiesAccessor providerTaskPropertiesAccessor = new DefaultProviderTaskPropertiesAccessor(providerTaskPropertiesRepository); try { providerTaskPropertiesAccessor.setTaskProperty(null, "", "", ""); fail(); } catch (AlertDatabaseCo...
@Override public void setTaskProperty(Long configId, String taskName, String propertyKey, String propertyValue) throws AlertDatabaseConstraintException { if (null == configId || StringUtils.isBlank(taskName) || StringUtils.isBlank(propertyKey) || StringUtils.isBlank(propertyValue)) { throw new AlertDatabaseConstraintEx...
DefaultProviderTaskPropertiesAccessor implements ProviderTaskPropertiesAccessor { @Override public void setTaskProperty(Long configId, String taskName, String propertyKey, String propertyValue) throws AlertDatabaseConstraintException { if (null == configId || StringUtils.isBlank(taskName) || StringUtils.isBlank(propert...
DefaultProviderTaskPropertiesAccessor implements ProviderTaskPropertiesAccessor { @Override public void setTaskProperty(Long configId, String taskName, String propertyKey, String propertyValue) throws AlertDatabaseConstraintException { if (null == configId || StringUtils.isBlank(taskName) || StringUtils.isBlank(propert...
DefaultProviderTaskPropertiesAccessor implements ProviderTaskPropertiesAccessor { @Override public void setTaskProperty(Long configId, String taskName, String propertyKey, String propertyValue) throws AlertDatabaseConstraintException { if (null == configId || StringUtils.isBlank(taskName) || StringUtils.isBlank(propert...
DefaultProviderTaskPropertiesAccessor implements ProviderTaskPropertiesAccessor { @Override public void setTaskProperty(Long configId, String taskName, String propertyKey, String propertyValue) throws AlertDatabaseConstraintException { if (null == configId || StringUtils.isBlank(taskName) || StringUtils.isBlank(propert...
@Test public void getRegisteredDescriptorsTest() throws Exception { final String name = "name-test"; final Long typeId = 1L; final DescriptorType descriptorType = DescriptorType.CHANNEL; RegisteredDescriptorEntity registeredDescriptorEntity = new RegisteredDescriptorEntity(name, typeId); registeredDescriptorEntity.setI...
@Override public List<RegisteredDescriptorModel> getRegisteredDescriptors() throws AlertDatabaseConstraintException { List<RegisteredDescriptorEntity> allDescriptors = registeredDescriptorRepository.findAll(); List<RegisteredDescriptorModel> descriptorModels = new ArrayList<>(); for (RegisteredDescriptorEntity entity :...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public List<RegisteredDescriptorModel> getRegisteredDescriptors() throws AlertDatabaseConstraintException { List<RegisteredDescriptorEntity> allDescriptors = registeredDescriptorRepository.findAll(); List<RegisteredDescriptorModel> descriptorModels = n...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public List<RegisteredDescriptorModel> getRegisteredDescriptors() throws AlertDatabaseConstraintException { List<RegisteredDescriptorEntity> allDescriptors = registeredDescriptorRepository.findAll(); List<RegisteredDescriptorModel> descriptorModels = n...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public List<RegisteredDescriptorModel> getRegisteredDescriptors() throws AlertDatabaseConstraintException { List<RegisteredDescriptorEntity> allDescriptors = registeredDescriptorRepository.findAll(); List<RegisteredDescriptorModel> descriptorModels = n...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public List<RegisteredDescriptorModel> getRegisteredDescriptors() throws AlertDatabaseConstraintException { List<RegisteredDescriptorEntity> allDescriptors = registeredDescriptorRepository.findAll(); List<RegisteredDescriptorModel> descriptorModels = n...
@Test public void getRegisteredDescriptorByKeyTest() throws Exception { final String name = "name-test"; final Long typeId = 1L; final DescriptorType descriptorType = DescriptorType.CHANNEL; RegisteredDescriptorEntity registeredDescriptorEntity = new RegisteredDescriptorEntity(name, typeId); registeredDescriptorEntity....
@Override public Optional<RegisteredDescriptorModel> getRegisteredDescriptorByKey(DescriptorKey descriptorKey) throws AlertDatabaseConstraintException { if (null == descriptorKey || StringUtils.isBlank(descriptorKey.getUniversalKey())) { throw new AlertDatabaseConstraintException(String.format("DescriptorKey is not val...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public Optional<RegisteredDescriptorModel> getRegisteredDescriptorByKey(DescriptorKey descriptorKey) throws AlertDatabaseConstraintException { if (null == descriptorKey || StringUtils.isBlank(descriptorKey.getUniversalKey())) { throw new AlertDatabaseC...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public Optional<RegisteredDescriptorModel> getRegisteredDescriptorByKey(DescriptorKey descriptorKey) throws AlertDatabaseConstraintException { if (null == descriptorKey || StringUtils.isBlank(descriptorKey.getUniversalKey())) { throw new AlertDatabaseC...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public Optional<RegisteredDescriptorModel> getRegisteredDescriptorByKey(DescriptorKey descriptorKey) throws AlertDatabaseConstraintException { if (null == descriptorKey || StringUtils.isBlank(descriptorKey.getUniversalKey())) { throw new AlertDatabaseC...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public Optional<RegisteredDescriptorModel> getRegisteredDescriptorByKey(DescriptorKey descriptorKey) throws AlertDatabaseConstraintException { if (null == descriptorKey || StringUtils.isBlank(descriptorKey.getUniversalKey())) { throw new AlertDatabaseC...
@Test public void descriptorKeyFailureTest() throws Exception { DefaultDescriptorAccessor descriptorAccessor = new DefaultDescriptorAccessor(null, null, null, null); DescriptorKey descriptorKey = createDescriptorKey(""); try { descriptorAccessor.getRegisteredDescriptorByKey(descriptorKey); fail(); } catch (AlertDatabas...
@Override public Optional<RegisteredDescriptorModel> getRegisteredDescriptorByKey(DescriptorKey descriptorKey) throws AlertDatabaseConstraintException { if (null == descriptorKey || StringUtils.isBlank(descriptorKey.getUniversalKey())) { throw new AlertDatabaseConstraintException(String.format("DescriptorKey is not val...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public Optional<RegisteredDescriptorModel> getRegisteredDescriptorByKey(DescriptorKey descriptorKey) throws AlertDatabaseConstraintException { if (null == descriptorKey || StringUtils.isBlank(descriptorKey.getUniversalKey())) { throw new AlertDatabaseC...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public Optional<RegisteredDescriptorModel> getRegisteredDescriptorByKey(DescriptorKey descriptorKey) throws AlertDatabaseConstraintException { if (null == descriptorKey || StringUtils.isBlank(descriptorKey.getUniversalKey())) { throw new AlertDatabaseC...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public Optional<RegisteredDescriptorModel> getRegisteredDescriptorByKey(DescriptorKey descriptorKey) throws AlertDatabaseConstraintException { if (null == descriptorKey || StringUtils.isBlank(descriptorKey.getUniversalKey())) { throw new AlertDatabaseC...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public Optional<RegisteredDescriptorModel> getRegisteredDescriptorByKey(DescriptorKey descriptorKey) throws AlertDatabaseConstraintException { if (null == descriptorKey || StringUtils.isBlank(descriptorKey.getUniversalKey())) { throw new AlertDatabaseC...
@Test public void getRegisteredDescriptorsByTypeTest() throws Exception { final String name = "name-test"; final Long typeId = 1L; final DescriptorType descriptorType = DescriptorType.CHANNEL; RegisteredDescriptorRepository registeredDescriptorRepository = Mockito.mock(RegisteredDescriptorRepository.class); DescriptorT...
@Override public List<RegisteredDescriptorModel> getRegisteredDescriptorsByType(DescriptorType descriptorType) throws AlertDatabaseConstraintException { if (null == descriptorType) { throw new AlertDatabaseConstraintException("Descriptor type cannot be null"); } Long typeId = saveDescriptorTypeAndReturnId(descriptorTyp...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public List<RegisteredDescriptorModel> getRegisteredDescriptorsByType(DescriptorType descriptorType) throws AlertDatabaseConstraintException { if (null == descriptorType) { throw new AlertDatabaseConstraintException("Descriptor type cannot be null"); }...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public List<RegisteredDescriptorModel> getRegisteredDescriptorsByType(DescriptorType descriptorType) throws AlertDatabaseConstraintException { if (null == descriptorType) { throw new AlertDatabaseConstraintException("Descriptor type cannot be null"); }...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public List<RegisteredDescriptorModel> getRegisteredDescriptorsByType(DescriptorType descriptorType) throws AlertDatabaseConstraintException { if (null == descriptorType) { throw new AlertDatabaseConstraintException("Descriptor type cannot be null"); }...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public List<RegisteredDescriptorModel> getRegisteredDescriptorsByType(DescriptorType descriptorType) throws AlertDatabaseConstraintException { if (null == descriptorType) { throw new AlertDatabaseConstraintException("Descriptor type cannot be null"); }...
@Test public void getRegisteredDescriptorsByTypeMissingDescriptorTypeTest() throws Exception { final String name = "name-test"; final Long typeId = 1L; final DescriptorType descriptorType = DescriptorType.CHANNEL; RegisteredDescriptorRepository registeredDescriptorRepository = Mockito.mock(RegisteredDescriptorRepositor...
@Override public List<RegisteredDescriptorModel> getRegisteredDescriptorsByType(DescriptorType descriptorType) throws AlertDatabaseConstraintException { if (null == descriptorType) { throw new AlertDatabaseConstraintException("Descriptor type cannot be null"); } Long typeId = saveDescriptorTypeAndReturnId(descriptorTyp...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public List<RegisteredDescriptorModel> getRegisteredDescriptorsByType(DescriptorType descriptorType) throws AlertDatabaseConstraintException { if (null == descriptorType) { throw new AlertDatabaseConstraintException("Descriptor type cannot be null"); }...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public List<RegisteredDescriptorModel> getRegisteredDescriptorsByType(DescriptorType descriptorType) throws AlertDatabaseConstraintException { if (null == descriptorType) { throw new AlertDatabaseConstraintException("Descriptor type cannot be null"); }...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public List<RegisteredDescriptorModel> getRegisteredDescriptorsByType(DescriptorType descriptorType) throws AlertDatabaseConstraintException { if (null == descriptorType) { throw new AlertDatabaseConstraintException("Descriptor type cannot be null"); }...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public List<RegisteredDescriptorModel> getRegisteredDescriptorsByType(DescriptorType descriptorType) throws AlertDatabaseConstraintException { if (null == descriptorType) { throw new AlertDatabaseConstraintException("Descriptor type cannot be null"); }...
@Test public void descriptorTypeFailureTest() throws Exception { DefaultDescriptorAccessor descriptorAccessor = new DefaultDescriptorAccessor(null, null, null, null); DescriptorType descriptorType = null; try { descriptorAccessor.getRegisteredDescriptorsByType(descriptorType); fail(); } catch (AlertDatabaseConstraintEx...
@Override public List<RegisteredDescriptorModel> getRegisteredDescriptorsByType(DescriptorType descriptorType) throws AlertDatabaseConstraintException { if (null == descriptorType) { throw new AlertDatabaseConstraintException("Descriptor type cannot be null"); } Long typeId = saveDescriptorTypeAndReturnId(descriptorTyp...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public List<RegisteredDescriptorModel> getRegisteredDescriptorsByType(DescriptorType descriptorType) throws AlertDatabaseConstraintException { if (null == descriptorType) { throw new AlertDatabaseConstraintException("Descriptor type cannot be null"); }...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public List<RegisteredDescriptorModel> getRegisteredDescriptorsByType(DescriptorType descriptorType) throws AlertDatabaseConstraintException { if (null == descriptorType) { throw new AlertDatabaseConstraintException("Descriptor type cannot be null"); }...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public List<RegisteredDescriptorModel> getRegisteredDescriptorsByType(DescriptorType descriptorType) throws AlertDatabaseConstraintException { if (null == descriptorType) { throw new AlertDatabaseConstraintException("Descriptor type cannot be null"); }...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public List<RegisteredDescriptorModel> getRegisteredDescriptorsByType(DescriptorType descriptorType) throws AlertDatabaseConstraintException { if (null == descriptorType) { throw new AlertDatabaseConstraintException("Descriptor type cannot be null"); }...
@Test public void getRegisteredDescriptorByIdTest() throws Exception { final String name = "name-test"; final Long typeId = 1L; final DescriptorType descriptorType = DescriptorType.CHANNEL; final Long descriptorId = 2L; RegisteredDescriptorEntity registeredDescriptorEntity = new RegisteredDescriptorEntity(name, typeId)...
@Override public Optional<RegisteredDescriptorModel> getRegisteredDescriptorById(Long descriptorId) throws AlertDatabaseConstraintException { RegisteredDescriptorEntity descriptor = findDescriptorById(descriptorId); return Optional.of(createRegisteredDescriptorModel(descriptor)); }
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public Optional<RegisteredDescriptorModel> getRegisteredDescriptorById(Long descriptorId) throws AlertDatabaseConstraintException { RegisteredDescriptorEntity descriptor = findDescriptorById(descriptorId); return Optional.of(createRegisteredDescriptorM...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public Optional<RegisteredDescriptorModel> getRegisteredDescriptorById(Long descriptorId) throws AlertDatabaseConstraintException { RegisteredDescriptorEntity descriptor = findDescriptorById(descriptorId); return Optional.of(createRegisteredDescriptorM...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public Optional<RegisteredDescriptorModel> getRegisteredDescriptorById(Long descriptorId) throws AlertDatabaseConstraintException { RegisteredDescriptorEntity descriptor = findDescriptorById(descriptorId); return Optional.of(createRegisteredDescriptorM...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public Optional<RegisteredDescriptorModel> getRegisteredDescriptorById(Long descriptorId) throws AlertDatabaseConstraintException { RegisteredDescriptorEntity descriptor = findDescriptorById(descriptorId); return Optional.of(createRegisteredDescriptorM...
@Test public void getFieldsForDescriptorTest() throws Exception { final String name = "name-test"; final Long typeId = 1L; final ConfigContextEnum configContextEnum = ConfigContextEnum.GLOBAL; final ConfigContextEnum invalidConfigContextEnum = ConfigContextEnum.DISTRIBUTION; final String definedFieldsKey = "defined-fie...
@Override public List<DefinedFieldModel> getFieldsForDescriptor(DescriptorKey descriptorKey, ConfigContextEnum context) throws AlertDatabaseConstraintException { RegisteredDescriptorEntity descriptor = findDescriptorByKey(descriptorKey); Long contextId = saveContextAndReturnId(context); return getFieldsForDescriptorId(...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public List<DefinedFieldModel> getFieldsForDescriptor(DescriptorKey descriptorKey, ConfigContextEnum context) throws AlertDatabaseConstraintException { RegisteredDescriptorEntity descriptor = findDescriptorByKey(descriptorKey); Long contextId = saveCon...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public List<DefinedFieldModel> getFieldsForDescriptor(DescriptorKey descriptorKey, ConfigContextEnum context) throws AlertDatabaseConstraintException { RegisteredDescriptorEntity descriptor = findDescriptorByKey(descriptorKey); Long contextId = saveCon...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public List<DefinedFieldModel> getFieldsForDescriptor(DescriptorKey descriptorKey, ConfigContextEnum context) throws AlertDatabaseConstraintException { RegisteredDescriptorEntity descriptor = findDescriptorByKey(descriptorKey); Long contextId = saveCon...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public List<DefinedFieldModel> getFieldsForDescriptor(DescriptorKey descriptorKey, ConfigContextEnum context) throws AlertDatabaseConstraintException { RegisteredDescriptorEntity descriptor = findDescriptorByKey(descriptorKey); Long contextId = saveCon...
@Test public void getFieldsForDescriptorByIdTest() throws Exception { final String name = "name-test"; final Long typeId = 1L; final ConfigContextEnum configContextEnum = ConfigContextEnum.GLOBAL; final String definedFieldsKey = "defined-field-key-test"; Boolean isSensitive = Boolean.TRUE; final Long descriptorId = 1L;...
@Override public List<DefinedFieldModel> getFieldsForDescriptorById(Long descriptorId, ConfigContextEnum context) throws AlertDatabaseConstraintException { RegisteredDescriptorEntity descriptor = findDescriptorById(descriptorId); Long contextId = saveContextAndReturnId(context); return getFieldsForDescriptorId(descript...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public List<DefinedFieldModel> getFieldsForDescriptorById(Long descriptorId, ConfigContextEnum context) throws AlertDatabaseConstraintException { RegisteredDescriptorEntity descriptor = findDescriptorById(descriptorId); Long contextId = saveContextAndR...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public List<DefinedFieldModel> getFieldsForDescriptorById(Long descriptorId, ConfigContextEnum context) throws AlertDatabaseConstraintException { RegisteredDescriptorEntity descriptor = findDescriptorById(descriptorId); Long contextId = saveContextAndR...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public List<DefinedFieldModel> getFieldsForDescriptorById(Long descriptorId, ConfigContextEnum context) throws AlertDatabaseConstraintException { RegisteredDescriptorEntity descriptor = findDescriptorById(descriptorId); Long contextId = saveContextAndR...
DefaultDescriptorAccessor implements DescriptorAccessor { @Override public List<DefinedFieldModel> getFieldsForDescriptorById(Long descriptorId, ConfigContextEnum context) throws AlertDatabaseConstraintException { RegisteredDescriptorEntity descriptor = findDescriptorById(descriptorId); Long contextId = saveContextAndR...
@Test public void getUsersByProviderConfigNameOptionalEmptyTest() throws Exception { ConfigurationAccessor configurationAccessor = Mockito.mock(ConfigurationAccessor.class); Mockito.when(configurationAccessor.getProviderConfigurationByName(Mockito.any())).thenReturn(Optional.empty()); DefaultProviderDataAccessor provid...
@Override public List<ProviderUserModel> getUsersByProviderConfigName(String providerConfigName) { if (StringUtils.isBlank(providerConfigName)) { return List.of(); } try { Optional<Long> optionalProviderConfigId = configurationAccessor.getProviderConfigurationByName(providerConfigName) .map(ConfigurationModel::getConfi...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override public List<ProviderUserModel> getUsersByProviderConfigName(String providerConfigName) { if (StringUtils.isBlank(providerConfigName)) { return List.of(); } try { Optional<Long> optionalProviderConfigId = configurationAccessor.getProviderConfigurati...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override public List<ProviderUserModel> getUsersByProviderConfigName(String providerConfigName) { if (StringUtils.isBlank(providerConfigName)) { return List.of(); } try { Optional<Long> optionalProviderConfigId = configurationAccessor.getProviderConfigurati...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override public List<ProviderUserModel> getUsersByProviderConfigName(String providerConfigName) { if (StringUtils.isBlank(providerConfigName)) { return List.of(); } try { Optional<Long> optionalProviderConfigId = configurationAccessor.getProviderConfigurati...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override public List<ProviderUserModel> getUsersByProviderConfigName(String providerConfigName) { if (StringUtils.isBlank(providerConfigName)) { return List.of(); } try { Optional<Long> optionalProviderConfigId = configurationAccessor.getProviderConfigurati...
@Test public void getUsersTest() { final Long authenticationTypeId = 1L; final String roleName = "userName"; UserEntity userEntity = new UserEntity(username, password, emailAddress, authenticationTypeId); userEntity.setId(1L); UserRoleRelation userRoleRelation = new UserRoleRelation(1L, 2L); UserRoleModel userRoleModel...
@Override public List<UserModel> getUsers() { List<UserEntity> userList = userRepository.findAll(); return userList.stream().map(this::createModel).collect(Collectors.toList()); }
DefaultUserAccessor implements UserAccessor { @Override public List<UserModel> getUsers() { List<UserEntity> userList = userRepository.findAll(); return userList.stream().map(this::createModel).collect(Collectors.toList()); } }
DefaultUserAccessor implements UserAccessor { @Override public List<UserModel> getUsers() { List<UserEntity> userList = userRepository.findAll(); return userList.stream().map(this::createModel).collect(Collectors.toList()); } @Autowired DefaultUserAccessor(UserRepository userRepository, UserRoleRepository userRoleRepo...
DefaultUserAccessor implements UserAccessor { @Override public List<UserModel> getUsers() { List<UserEntity> userList = userRepository.findAll(); return userList.stream().map(this::createModel).collect(Collectors.toList()); } @Autowired DefaultUserAccessor(UserRepository userRepository, UserRoleRepository userRoleRepo...
DefaultUserAccessor implements UserAccessor { @Override public List<UserModel> getUsers() { List<UserEntity> userList = userRepository.findAll(); return userList.stream().map(this::createModel).collect(Collectors.toList()); } @Autowired DefaultUserAccessor(UserRepository userRepository, UserRoleRepository userRoleRepo...
@Test public void getUserByUserIdTest() { final Long userId = 1L; final Long emptyUserId = 5L; final Long authenticationTypeId = 1L; final String roleName = "userName"; UserEntity userEntity = new UserEntity(username, password, emailAddress, authenticationTypeId); userEntity.setId(1L); UserRoleRelation userRoleRelation...
@Override public Optional<UserModel> getUser(Long userId) { return userRepository.findById(userId).map(this::createModel); }
DefaultUserAccessor implements UserAccessor { @Override public Optional<UserModel> getUser(Long userId) { return userRepository.findById(userId).map(this::createModel); } }
DefaultUserAccessor implements UserAccessor { @Override public Optional<UserModel> getUser(Long userId) { return userRepository.findById(userId).map(this::createModel); } @Autowired DefaultUserAccessor(UserRepository userRepository, UserRoleRepository userRoleRepository, PasswordEncoder defaultPasswordEncoder, Default...
DefaultUserAccessor implements UserAccessor { @Override public Optional<UserModel> getUser(Long userId) { return userRepository.findById(userId).map(this::createModel); } @Autowired DefaultUserAccessor(UserRepository userRepository, UserRoleRepository userRoleRepository, PasswordEncoder defaultPasswordEncoder, Default...
DefaultUserAccessor implements UserAccessor { @Override public Optional<UserModel> getUser(Long userId) { return userRepository.findById(userId).map(this::createModel); } @Autowired DefaultUserAccessor(UserRepository userRepository, UserRoleRepository userRoleRepository, PasswordEncoder defaultPasswordEncoder, Default...
@Test public void getUserByUsernameTest() { final String emptyUsername = ""; final Long authenticationTypeId = 1L; final String roleName = "userName"; UserEntity userEntity = new UserEntity(username, password, emailAddress, authenticationTypeId); userEntity.setId(1L); UserRoleRelation userRoleRelation = new UserRoleRel...
@Override public Optional<UserModel> getUser(Long userId) { return userRepository.findById(userId).map(this::createModel); }
DefaultUserAccessor implements UserAccessor { @Override public Optional<UserModel> getUser(Long userId) { return userRepository.findById(userId).map(this::createModel); } }
DefaultUserAccessor implements UserAccessor { @Override public Optional<UserModel> getUser(Long userId) { return userRepository.findById(userId).map(this::createModel); } @Autowired DefaultUserAccessor(UserRepository userRepository, UserRoleRepository userRoleRepository, PasswordEncoder defaultPasswordEncoder, Default...
DefaultUserAccessor implements UserAccessor { @Override public Optional<UserModel> getUser(Long userId) { return userRepository.findById(userId).map(this::createModel); } @Autowired DefaultUserAccessor(UserRepository userRepository, UserRoleRepository userRoleRepository, PasswordEncoder defaultPasswordEncoder, Default...
DefaultUserAccessor implements UserAccessor { @Override public Optional<UserModel> getUser(Long userId) { return userRepository.findById(userId).map(this::createModel); } @Autowired DefaultUserAccessor(UserRepository userRepository, UserRoleRepository userRoleRepository, PasswordEncoder defaultPasswordEncoder, Default...
@Test public void addUserTest() throws Exception { final String roleName = "userName"; UserEntity userEntity = new UserEntity(username, password, emailAddress, 2L); userEntity.setId(1L); AuthenticationTypeDetails authenticationTypeDetails = new AuthenticationTypeDetails(2L, "authentication-name"); UserRoleRelation user...
@Override public UserModel addUser(String userName, String password, String emailAddress) throws AlertDatabaseConstraintException { return addUser(UserModel.newUser(userName, password, emailAddress, AuthenticationType.DATABASE, Collections.emptySet(), true), false); }
DefaultUserAccessor implements UserAccessor { @Override public UserModel addUser(String userName, String password, String emailAddress) throws AlertDatabaseConstraintException { return addUser(UserModel.newUser(userName, password, emailAddress, AuthenticationType.DATABASE, Collections.emptySet(), true), false); } }
DefaultUserAccessor implements UserAccessor { @Override public UserModel addUser(String userName, String password, String emailAddress) throws AlertDatabaseConstraintException { return addUser(UserModel.newUser(userName, password, emailAddress, AuthenticationType.DATABASE, Collections.emptySet(), true), false); } @Auto...
DefaultUserAccessor implements UserAccessor { @Override public UserModel addUser(String userName, String password, String emailAddress) throws AlertDatabaseConstraintException { return addUser(UserModel.newUser(userName, password, emailAddress, AuthenticationType.DATABASE, Collections.emptySet(), true), false); } @Auto...
DefaultUserAccessor implements UserAccessor { @Override public UserModel addUser(String userName, String password, String emailAddress) throws AlertDatabaseConstraintException { return addUser(UserModel.newUser(userName, password, emailAddress, AuthenticationType.DATABASE, Collections.emptySet(), true), false); } @Auto...
@Test public void addUserExistsTest() throws Exception { UserEntity userEntity = new UserEntity(username, password, emailAddress, 2L); userEntity.setId(1L); Mockito.when(userRepository.findByUserName(Mockito.any())).thenReturn(Optional.of(userEntity)); DefaultUserAccessor defaultUserAccessor = new DefaultUserAccessor(u...
@Override public UserModel addUser(String userName, String password, String emailAddress) throws AlertDatabaseConstraintException { return addUser(UserModel.newUser(userName, password, emailAddress, AuthenticationType.DATABASE, Collections.emptySet(), true), false); }
DefaultUserAccessor implements UserAccessor { @Override public UserModel addUser(String userName, String password, String emailAddress) throws AlertDatabaseConstraintException { return addUser(UserModel.newUser(userName, password, emailAddress, AuthenticationType.DATABASE, Collections.emptySet(), true), false); } }
DefaultUserAccessor implements UserAccessor { @Override public UserModel addUser(String userName, String password, String emailAddress) throws AlertDatabaseConstraintException { return addUser(UserModel.newUser(userName, password, emailAddress, AuthenticationType.DATABASE, Collections.emptySet(), true), false); } @Auto...
DefaultUserAccessor implements UserAccessor { @Override public UserModel addUser(String userName, String password, String emailAddress) throws AlertDatabaseConstraintException { return addUser(UserModel.newUser(userName, password, emailAddress, AuthenticationType.DATABASE, Collections.emptySet(), true), false); } @Auto...
DefaultUserAccessor implements UserAccessor { @Override public UserModel addUser(String userName, String password, String emailAddress) throws AlertDatabaseConstraintException { return addUser(UserModel.newUser(userName, password, emailAddress, AuthenticationType.DATABASE, Collections.emptySet(), true), false); } @Auto...
@Test public void updateUserTest() throws Exception { final String roleName = "userName"; AuthenticationType authenticationType = AuthenticationType.DATABASE; UserEntity userEntity = new UserEntity(username, password, emailAddress, 2L); userEntity.setId(1L); UserRoleModel roles = createUserRoleModel(1L, roleName, true)...
@Override public UserModel updateUser(UserModel user, boolean passwordEncoded) throws AlertDatabaseConstraintException { Long userId = user.getId(); if (null == userId) { throw new AlertDatabaseConstraintException("A user id must be specified"); } UserEntity existingUser = userRepository.findById(userId) .orElseThrow((...
DefaultUserAccessor implements UserAccessor { @Override public UserModel updateUser(UserModel user, boolean passwordEncoded) throws AlertDatabaseConstraintException { Long userId = user.getId(); if (null == userId) { throw new AlertDatabaseConstraintException("A user id must be specified"); } UserEntity existingUser = ...
DefaultUserAccessor implements UserAccessor { @Override public UserModel updateUser(UserModel user, boolean passwordEncoded) throws AlertDatabaseConstraintException { Long userId = user.getId(); if (null == userId) { throw new AlertDatabaseConstraintException("A user id must be specified"); } UserEntity existingUser = ...
DefaultUserAccessor implements UserAccessor { @Override public UserModel updateUser(UserModel user, boolean passwordEncoded) throws AlertDatabaseConstraintException { Long userId = user.getId(); if (null == userId) { throw new AlertDatabaseConstraintException("A user id must be specified"); } UserEntity existingUser = ...
DefaultUserAccessor implements UserAccessor { @Override public UserModel updateUser(UserModel user, boolean passwordEncoded) throws AlertDatabaseConstraintException { Long userId = user.getId(); if (null == userId) { throw new AlertDatabaseConstraintException("A user id must be specified"); } UserEntity existingUser = ...
@Test public void updateUserNullTest() { UserRoleModel roles = createUserRoleModel(1L, "roleName", true); UserModel userModel = UserModel.newUser(username, password, emailAddress, AuthenticationType.DATABASE, Set.of(roles), true); DefaultUserAccessor defaultUserAccessor = new DefaultUserAccessor(userRepository, userRol...
@Override public UserModel updateUser(UserModel user, boolean passwordEncoded) throws AlertDatabaseConstraintException { Long userId = user.getId(); if (null == userId) { throw new AlertDatabaseConstraintException("A user id must be specified"); } UserEntity existingUser = userRepository.findById(userId) .orElseThrow((...
DefaultUserAccessor implements UserAccessor { @Override public UserModel updateUser(UserModel user, boolean passwordEncoded) throws AlertDatabaseConstraintException { Long userId = user.getId(); if (null == userId) { throw new AlertDatabaseConstraintException("A user id must be specified"); } UserEntity existingUser = ...
DefaultUserAccessor implements UserAccessor { @Override public UserModel updateUser(UserModel user, boolean passwordEncoded) throws AlertDatabaseConstraintException { Long userId = user.getId(); if (null == userId) { throw new AlertDatabaseConstraintException("A user id must be specified"); } UserEntity existingUser = ...
DefaultUserAccessor implements UserAccessor { @Override public UserModel updateUser(UserModel user, boolean passwordEncoded) throws AlertDatabaseConstraintException { Long userId = user.getId(); if (null == userId) { throw new AlertDatabaseConstraintException("A user id must be specified"); } UserEntity existingUser = ...
DefaultUserAccessor implements UserAccessor { @Override public UserModel updateUser(UserModel user, boolean passwordEncoded) throws AlertDatabaseConstraintException { Long userId = user.getId(); if (null == userId) { throw new AlertDatabaseConstraintException("A user id must be specified"); } UserEntity existingUser = ...
@Test public void updateUserAuthenticationTypeEmptyTest() { final String roleName = "userName"; AuthenticationType authenticationType = AuthenticationType.DATABASE; UserEntity userEntity = new UserEntity(username, password, emailAddress, 2L); userEntity.setId(1L); UserRoleModel roles = createUserRoleModel(1L, roleName,...
@Override public UserModel updateUser(UserModel user, boolean passwordEncoded) throws AlertDatabaseConstraintException { Long userId = user.getId(); if (null == userId) { throw new AlertDatabaseConstraintException("A user id must be specified"); } UserEntity existingUser = userRepository.findById(userId) .orElseThrow((...
DefaultUserAccessor implements UserAccessor { @Override public UserModel updateUser(UserModel user, boolean passwordEncoded) throws AlertDatabaseConstraintException { Long userId = user.getId(); if (null == userId) { throw new AlertDatabaseConstraintException("A user id must be specified"); } UserEntity existingUser = ...
DefaultUserAccessor implements UserAccessor { @Override public UserModel updateUser(UserModel user, boolean passwordEncoded) throws AlertDatabaseConstraintException { Long userId = user.getId(); if (null == userId) { throw new AlertDatabaseConstraintException("A user id must be specified"); } UserEntity existingUser = ...
DefaultUserAccessor implements UserAccessor { @Override public UserModel updateUser(UserModel user, boolean passwordEncoded) throws AlertDatabaseConstraintException { Long userId = user.getId(); if (null == userId) { throw new AlertDatabaseConstraintException("A user id must be specified"); } UserEntity existingUser = ...
DefaultUserAccessor implements UserAccessor { @Override public UserModel updateUser(UserModel user, boolean passwordEncoded) throws AlertDatabaseConstraintException { Long userId = user.getId(); if (null == userId) { throw new AlertDatabaseConstraintException("A user id must be specified"); } UserEntity existingUser = ...
@Test public void updateUserNonDatabaseAuthTest() throws Exception { final String roleName = "roleName"; AuthenticationType authenticationType = AuthenticationType.LDAP; UserEntity userEntity = new UserEntity(username, password, emailAddress, 2L); userEntity.setId(1L); UserRoleModel roles = createUserRoleModel(1L, role...
@Override public UserModel updateUser(UserModel user, boolean passwordEncoded) throws AlertDatabaseConstraintException { Long userId = user.getId(); if (null == userId) { throw new AlertDatabaseConstraintException("A user id must be specified"); } UserEntity existingUser = userRepository.findById(userId) .orElseThrow((...
DefaultUserAccessor implements UserAccessor { @Override public UserModel updateUser(UserModel user, boolean passwordEncoded) throws AlertDatabaseConstraintException { Long userId = user.getId(); if (null == userId) { throw new AlertDatabaseConstraintException("A user id must be specified"); } UserEntity existingUser = ...
DefaultUserAccessor implements UserAccessor { @Override public UserModel updateUser(UserModel user, boolean passwordEncoded) throws AlertDatabaseConstraintException { Long userId = user.getId(); if (null == userId) { throw new AlertDatabaseConstraintException("A user id must be specified"); } UserEntity existingUser = ...
DefaultUserAccessor implements UserAccessor { @Override public UserModel updateUser(UserModel user, boolean passwordEncoded) throws AlertDatabaseConstraintException { Long userId = user.getId(); if (null == userId) { throw new AlertDatabaseConstraintException("A user id must be specified"); } UserEntity existingUser = ...
DefaultUserAccessor implements UserAccessor { @Override public UserModel updateUser(UserModel user, boolean passwordEncoded) throws AlertDatabaseConstraintException { Long userId = user.getId(); if (null == userId) { throw new AlertDatabaseConstraintException("A user id must be specified"); } UserEntity existingUser = ...
@Test public void updateUserNonDatabaseAuthInvalidTest() throws Exception { final String roleName = "roleName"; AuthenticationType authenticationType = AuthenticationType.LDAP; UserEntity userEntity = new UserEntity(username, password, emailAddress, 2L); userEntity.setId(1L); UserEntity existingUserEntity = new UserEnt...
@Override public UserModel updateUser(UserModel user, boolean passwordEncoded) throws AlertDatabaseConstraintException { Long userId = user.getId(); if (null == userId) { throw new AlertDatabaseConstraintException("A user id must be specified"); } UserEntity existingUser = userRepository.findById(userId) .orElseThrow((...
DefaultUserAccessor implements UserAccessor { @Override public UserModel updateUser(UserModel user, boolean passwordEncoded) throws AlertDatabaseConstraintException { Long userId = user.getId(); if (null == userId) { throw new AlertDatabaseConstraintException("A user id must be specified"); } UserEntity existingUser = ...
DefaultUserAccessor implements UserAccessor { @Override public UserModel updateUser(UserModel user, boolean passwordEncoded) throws AlertDatabaseConstraintException { Long userId = user.getId(); if (null == userId) { throw new AlertDatabaseConstraintException("A user id must be specified"); } UserEntity existingUser = ...
DefaultUserAccessor implements UserAccessor { @Override public UserModel updateUser(UserModel user, boolean passwordEncoded) throws AlertDatabaseConstraintException { Long userId = user.getId(); if (null == userId) { throw new AlertDatabaseConstraintException("A user id must be specified"); } UserEntity existingUser = ...
DefaultUserAccessor implements UserAccessor { @Override public UserModel updateUser(UserModel user, boolean passwordEncoded) throws AlertDatabaseConstraintException { Long userId = user.getId(); if (null == userId) { throw new AlertDatabaseConstraintException("A user id must be specified"); } UserEntity existingUser = ...
@Test public void updateProjectAndUserDataTest() { ProviderProjectEntity storedProviderProjectEntity = new ProviderProjectEntity("stored-name", "stored-description", "stored-href", "stored-Email", 2L); ProviderProject providerProject = new ProviderProject(name, description, href, projectOwnerEmail); ProviderProjectEnti...
@Override public void updateProjectAndUserData(Long providerConfigId, Map<ProviderProject, Set<String>> projectToUserData, Set<String> additionalRelevantUsers) { updateProjectDB(providerConfigId, projectToUserData.keySet()); Set<String> userData = projectToUserData.values().stream().flatMap(Collection::stream).collect(...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override public void updateProjectAndUserData(Long providerConfigId, Map<ProviderProject, Set<String>> projectToUserData, Set<String> additionalRelevantUsers) { updateProjectDB(providerConfigId, projectToUserData.keySet()); Set<String> userData = projectToU...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override public void updateProjectAndUserData(Long providerConfigId, Map<ProviderProject, Set<String>> projectToUserData, Set<String> additionalRelevantUsers) { updateProjectDB(providerConfigId, projectToUserData.keySet()); Set<String> userData = projectToU...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override public void updateProjectAndUserData(Long providerConfigId, Map<ProviderProject, Set<String>> projectToUserData, Set<String> additionalRelevantUsers) { updateProjectDB(providerConfigId, projectToUserData.keySet()); Set<String> userData = projectToU...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override public void updateProjectAndUserData(Long providerConfigId, Map<ProviderProject, Set<String>> projectToUserData, Set<String> additionalRelevantUsers) { updateProjectDB(providerConfigId, projectToUserData.keySet()); Set<String> userData = projectToU...
@Test public void assignRolesTest() { final String badUsername = "badUsername"; final Long roleId = 5L; UserEntity userEntity = new UserEntity(username, password, emailAddress, 2L); userEntity.setId(1L); Mockito.when(userRepository.findByUserName(Mockito.eq(username))).thenReturn(Optional.of(userEntity)); Mockito.when(...
@Override public boolean assignRoles(String username, Set<Long> roleIds) { Optional<Long> optionalUserId = userRepository.findByUserName(username).map(UserEntity::getId); if (optionalUserId.isPresent()) { roleAccessor.updateUserRoles(optionalUserId.get(), roleAccessor.getRoles(roleIds)); return true; } return false; }
DefaultUserAccessor implements UserAccessor { @Override public boolean assignRoles(String username, Set<Long> roleIds) { Optional<Long> optionalUserId = userRepository.findByUserName(username).map(UserEntity::getId); if (optionalUserId.isPresent()) { roleAccessor.updateUserRoles(optionalUserId.get(), roleAccessor.getRo...
DefaultUserAccessor implements UserAccessor { @Override public boolean assignRoles(String username, Set<Long> roleIds) { Optional<Long> optionalUserId = userRepository.findByUserName(username).map(UserEntity::getId); if (optionalUserId.isPresent()) { roleAccessor.updateUserRoles(optionalUserId.get(), roleAccessor.getRo...
DefaultUserAccessor implements UserAccessor { @Override public boolean assignRoles(String username, Set<Long> roleIds) { Optional<Long> optionalUserId = userRepository.findByUserName(username).map(UserEntity::getId); if (optionalUserId.isPresent()) { roleAccessor.updateUserRoles(optionalUserId.get(), roleAccessor.getRo...
DefaultUserAccessor implements UserAccessor { @Override public boolean assignRoles(String username, Set<Long> roleIds) { Optional<Long> optionalUserId = userRepository.findByUserName(username).map(UserEntity::getId); if (optionalUserId.isPresent()) { roleAccessor.updateUserRoles(optionalUserId.get(), roleAccessor.getRo...
@Test public void changeUserPasswordTest() { final String badUsername = "badUsername"; final String newPassword = "newPassword"; UserEntity userEntity = new UserEntity(username, password, emailAddress, 2L); userEntity.setId(1L); UserEntity newUserEntity = new UserEntity(username, newPassword, emailAddress, 2L); userEnt...
@Override public boolean changeUserPassword(String username, String newPassword) { Optional<UserEntity> entity = userRepository.findByUserName(username); if (entity.isPresent()) { return changeUserPassword(entity.get(), newPassword); } return false; }
DefaultUserAccessor implements UserAccessor { @Override public boolean changeUserPassword(String username, String newPassword) { Optional<UserEntity> entity = userRepository.findByUserName(username); if (entity.isPresent()) { return changeUserPassword(entity.get(), newPassword); } return false; } }
DefaultUserAccessor implements UserAccessor { @Override public boolean changeUserPassword(String username, String newPassword) { Optional<UserEntity> entity = userRepository.findByUserName(username); if (entity.isPresent()) { return changeUserPassword(entity.get(), newPassword); } return false; } @Autowired DefaultUse...
DefaultUserAccessor implements UserAccessor { @Override public boolean changeUserPassword(String username, String newPassword) { Optional<UserEntity> entity = userRepository.findByUserName(username); if (entity.isPresent()) { return changeUserPassword(entity.get(), newPassword); } return false; } @Autowired DefaultUse...
DefaultUserAccessor implements UserAccessor { @Override public boolean changeUserPassword(String username, String newPassword) { Optional<UserEntity> entity = userRepository.findByUserName(username); if (entity.isPresent()) { return changeUserPassword(entity.get(), newPassword); } return false; } @Autowired DefaultUse...
@Test public void changeUserEmailAddressTest() { final String badUsername = "badUsername"; final String newEmailAddress = "[email protected]"; UserEntity userEntity = new UserEntity(username, password, emailAddress, 2L); userEntity.setId(1L); UserEntity newUserEntity = new UserEntity(username, pas...
@Override public boolean changeUserEmailAddress(String username, String emailAddress) { Optional<UserEntity> entity = userRepository.findByUserName(username); if (entity.isPresent()) { return changeUserEmailAddress(entity.get(), emailAddress); } return false; }
DefaultUserAccessor implements UserAccessor { @Override public boolean changeUserEmailAddress(String username, String emailAddress) { Optional<UserEntity> entity = userRepository.findByUserName(username); if (entity.isPresent()) { return changeUserEmailAddress(entity.get(), emailAddress); } return false; } }
DefaultUserAccessor implements UserAccessor { @Override public boolean changeUserEmailAddress(String username, String emailAddress) { Optional<UserEntity> entity = userRepository.findByUserName(username); if (entity.isPresent()) { return changeUserEmailAddress(entity.get(), emailAddress); } return false; } @Autowired ...
DefaultUserAccessor implements UserAccessor { @Override public boolean changeUserEmailAddress(String username, String emailAddress) { Optional<UserEntity> entity = userRepository.findByUserName(username); if (entity.isPresent()) { return changeUserEmailAddress(entity.get(), emailAddress); } return false; } @Autowired ...
DefaultUserAccessor implements UserAccessor { @Override public boolean changeUserEmailAddress(String username, String emailAddress) { Optional<UserEntity> entity = userRepository.findByUserName(username); if (entity.isPresent()) { return changeUserEmailAddress(entity.get(), emailAddress); } return false; } @Autowired ...
@Test public void deleteUserByNameTest() throws Exception { UserEntity userEntity = new UserEntity(username, password, emailAddress, 2L); userEntity.setId(5L); Mockito.when(userRepository.findByUserName(Mockito.eq(username))).thenReturn(Optional.of(userEntity)); DefaultUserAccessor defaultUserAccessor = new DefaultUser...
@Override public void deleteUser(String userName) throws AlertForbiddenOperationException { Optional<UserEntity> optionalUser = userRepository.findByUserName(userName); if (optionalUser.isPresent()) { UserEntity user = optionalUser.get(); deleteUserEntity(user); } }
DefaultUserAccessor implements UserAccessor { @Override public void deleteUser(String userName) throws AlertForbiddenOperationException { Optional<UserEntity> optionalUser = userRepository.findByUserName(userName); if (optionalUser.isPresent()) { UserEntity user = optionalUser.get(); deleteUserEntity(user); } } }
DefaultUserAccessor implements UserAccessor { @Override public void deleteUser(String userName) throws AlertForbiddenOperationException { Optional<UserEntity> optionalUser = userRepository.findByUserName(userName); if (optionalUser.isPresent()) { UserEntity user = optionalUser.get(); deleteUserEntity(user); } } @Autowi...
DefaultUserAccessor implements UserAccessor { @Override public void deleteUser(String userName) throws AlertForbiddenOperationException { Optional<UserEntity> optionalUser = userRepository.findByUserName(userName); if (optionalUser.isPresent()) { UserEntity user = optionalUser.get(); deleteUserEntity(user); } } @Autowi...
DefaultUserAccessor implements UserAccessor { @Override public void deleteUser(String userName) throws AlertForbiddenOperationException { Optional<UserEntity> optionalUser = userRepository.findByUserName(userName); if (optionalUser.isPresent()) { UserEntity user = optionalUser.get(); deleteUserEntity(user); } } @Autowi...
@Test public void deleteUserByIdTest() throws Exception { UserEntity userEntity = new UserEntity(username, password, emailAddress, 2L); userEntity.setId(5L); Mockito.when(userRepository.findById(Mockito.eq(userEntity.getId()))).thenReturn(Optional.of(userEntity)); DefaultUserAccessor defaultUserAccessor = new DefaultUs...
@Override public void deleteUser(String userName) throws AlertForbiddenOperationException { Optional<UserEntity> optionalUser = userRepository.findByUserName(userName); if (optionalUser.isPresent()) { UserEntity user = optionalUser.get(); deleteUserEntity(user); } }
DefaultUserAccessor implements UserAccessor { @Override public void deleteUser(String userName) throws AlertForbiddenOperationException { Optional<UserEntity> optionalUser = userRepository.findByUserName(userName); if (optionalUser.isPresent()) { UserEntity user = optionalUser.get(); deleteUserEntity(user); } } }
DefaultUserAccessor implements UserAccessor { @Override public void deleteUser(String userName) throws AlertForbiddenOperationException { Optional<UserEntity> optionalUser = userRepository.findByUserName(userName); if (optionalUser.isPresent()) { UserEntity user = optionalUser.get(); deleteUserEntity(user); } } @Autowi...
DefaultUserAccessor implements UserAccessor { @Override public void deleteUser(String userName) throws AlertForbiddenOperationException { Optional<UserEntity> optionalUser = userRepository.findByUserName(userName); if (optionalUser.isPresent()) { UserEntity user = optionalUser.get(); deleteUserEntity(user); } } @Autowi...
DefaultUserAccessor implements UserAccessor { @Override public void deleteUser(String userName) throws AlertForbiddenOperationException { Optional<UserEntity> optionalUser = userRepository.findByUserName(userName); if (optionalUser.isPresent()) { UserEntity user = optionalUser.get(); deleteUserEntity(user); } } @Autowi...
@Test public void deleteUserReservedIdTest() throws Exception { UserEntity userEntity = new UserEntity(username, password, emailAddress, 2L); userEntity.setId(1L); Mockito.when(userRepository.findByUserName(Mockito.eq(username))).thenReturn(Optional.of(userEntity)); Mockito.when(userRepository.findById(Mockito.any()))....
@Override public void deleteUser(String userName) throws AlertForbiddenOperationException { Optional<UserEntity> optionalUser = userRepository.findByUserName(userName); if (optionalUser.isPresent()) { UserEntity user = optionalUser.get(); deleteUserEntity(user); } }
DefaultUserAccessor implements UserAccessor { @Override public void deleteUser(String userName) throws AlertForbiddenOperationException { Optional<UserEntity> optionalUser = userRepository.findByUserName(userName); if (optionalUser.isPresent()) { UserEntity user = optionalUser.get(); deleteUserEntity(user); } } }
DefaultUserAccessor implements UserAccessor { @Override public void deleteUser(String userName) throws AlertForbiddenOperationException { Optional<UserEntity> optionalUser = userRepository.findByUserName(userName); if (optionalUser.isPresent()) { UserEntity user = optionalUser.get(); deleteUserEntity(user); } } @Autowi...
DefaultUserAccessor implements UserAccessor { @Override public void deleteUser(String userName) throws AlertForbiddenOperationException { Optional<UserEntity> optionalUser = userRepository.findByUserName(userName); if (optionalUser.isPresent()) { UserEntity user = optionalUser.get(); deleteUserEntity(user); } } @Autowi...
DefaultUserAccessor implements UserAccessor { @Override public void deleteUser(String userName) throws AlertForbiddenOperationException { Optional<UserEntity> optionalUser = userRepository.findByUserName(userName); if (optionalUser.isPresent()) { UserEntity user = optionalUser.get(); deleteUserEntity(user); } } @Autowi...
@Test public void extractFieldValidTest() { Gson gson = new GsonBuilder().create(); AzureFieldsExtractor azureFieldsExtractor = new AzureFieldsExtractor(gson); FieldsTestClass originalCopy = createTestClass("a value", 42, "a different value", 8675309); String jsonString = gson.toJson(originalCopy); JsonObject jsonObjec...
public <T> Optional<T> extractField(JsonObject fieldsObject, AzureFieldDefinition<T> fieldDefinition) { JsonElement foundField = fieldsObject.get(fieldDefinition.getFieldName()); if (null != foundField) { T fieldValue = gson.fromJson(foundField, fieldDefinition.getFieldType()); return Optional.of(fieldValue); } return ...
AzureFieldsExtractor { public <T> Optional<T> extractField(JsonObject fieldsObject, AzureFieldDefinition<T> fieldDefinition) { JsonElement foundField = fieldsObject.get(fieldDefinition.getFieldName()); if (null != foundField) { T fieldValue = gson.fromJson(foundField, fieldDefinition.getFieldType()); return Optional.of...
AzureFieldsExtractor { public <T> Optional<T> extractField(JsonObject fieldsObject, AzureFieldDefinition<T> fieldDefinition) { JsonElement foundField = fieldsObject.get(fieldDefinition.getFieldName()); if (null != foundField) { T fieldValue = gson.fromJson(foundField, fieldDefinition.getFieldType()); return Optional.of...
AzureFieldsExtractor { public <T> Optional<T> extractField(JsonObject fieldsObject, AzureFieldDefinition<T> fieldDefinition) { JsonElement foundField = fieldsObject.get(fieldDefinition.getFieldName()); if (null != foundField) { T fieldValue = gson.fromJson(foundField, fieldDefinition.getFieldType()); return Optional.of...
AzureFieldsExtractor { public <T> Optional<T> extractField(JsonObject fieldsObject, AzureFieldDefinition<T> fieldDefinition) { JsonElement foundField = fieldsObject.get(fieldDefinition.getFieldName()); if (null != foundField) { T fieldValue = gson.fromJson(foundField, fieldDefinition.getFieldType()); return Optional.of...
@Test public void testServerServiceFactory() { try { JiraServerProperties properties = new JiraServerProperties("http: JiraServerServiceFactory serviceFactory = properties.createJiraServicesServerFactory(LoggerFactory.getLogger(getClass()), new Gson()); assertNotNull(serviceFactory); } catch (IssueTrackerException ex) ...
public JiraServerServiceFactory createJiraServicesServerFactory(Logger logger, Gson gson) throws IssueTrackerException { JiraServerRestConfig jiraServerConfig = createJiraServerConfig(); Slf4jIntLogger intLogger = new Slf4jIntLogger(logger); JiraHttpClient jiraHttpClient = jiraServerConfig.createJiraHttpClient(intLogge...
JiraServerProperties implements IssueTrackerServiceConfig { public JiraServerServiceFactory createJiraServicesServerFactory(Logger logger, Gson gson) throws IssueTrackerException { JiraServerRestConfig jiraServerConfig = createJiraServerConfig(); Slf4jIntLogger intLogger = new Slf4jIntLogger(logger); JiraHttpClient jir...
JiraServerProperties implements IssueTrackerServiceConfig { public JiraServerServiceFactory createJiraServicesServerFactory(Logger logger, Gson gson) throws IssueTrackerException { JiraServerRestConfig jiraServerConfig = createJiraServerConfig(); Slf4jIntLogger intLogger = new Slf4jIntLogger(logger); JiraHttpClient jir...
JiraServerProperties implements IssueTrackerServiceConfig { public JiraServerServiceFactory createJiraServicesServerFactory(Logger logger, Gson gson) throws IssueTrackerException { JiraServerRestConfig jiraServerConfig = createJiraServerConfig(); Slf4jIntLogger intLogger = new Slf4jIntLogger(logger); JiraHttpClient jir...
JiraServerProperties implements IssueTrackerServiceConfig { public JiraServerServiceFactory createJiraServicesServerFactory(Logger logger, Gson gson) throws IssueTrackerException { JiraServerRestConfig jiraServerConfig = createJiraServerConfig(); Slf4jIntLogger intLogger = new Slf4jIntLogger(logger); JiraHttpClient jir...
@Test public void validateSuccessTest() throws IntegrationException { ProjectService projectService = Mockito.mock(ProjectService.class); UserSearchService userSearchService = Mockito.mock(UserSearchService.class); IssueTypeService issueTypeService = Mockito.mock(IssueTypeService.class); IssueMetaDataService issueMetaD...
@Override public Collection<ProjectComponent> getProjectsByName(String jiraProjectName) throws IntegrationException { return projectService.getProjectsByName(jiraProjectName); }
JiraServerIssueConfigValidator extends JiraIssueConfigValidator { @Override public Collection<ProjectComponent> getProjectsByName(String jiraProjectName) throws IntegrationException { return projectService.getProjectsByName(jiraProjectName); } }
JiraServerIssueConfigValidator extends JiraIssueConfigValidator { @Override public Collection<ProjectComponent> getProjectsByName(String jiraProjectName) throws IntegrationException { return projectService.getProjectsByName(jiraProjectName); } JiraServerIssueConfigValidator(ProjectService projectService, UserSearchServ...
JiraServerIssueConfigValidator extends JiraIssueConfigValidator { @Override public Collection<ProjectComponent> getProjectsByName(String jiraProjectName) throws IntegrationException { return projectService.getProjectsByName(jiraProjectName); } JiraServerIssueConfigValidator(ProjectService projectService, UserSearchServ...
JiraServerIssueConfigValidator extends JiraIssueConfigValidator { @Override public Collection<ProjectComponent> getProjectsByName(String jiraProjectName) throws IntegrationException { return projectService.getProjectsByName(jiraProjectName); } JiraServerIssueConfigValidator(ProjectService projectService, UserSearchServ...
@Test public void testContextNull() throws Exception { JiraServerRequestDelegator service = new JiraServerRequestDelegator(gson, null); List<IssueTrackerRequest> requests = new ArrayList<>(); try { service.sendRequests(requests); fail(); } catch (IssueTrackerException ex) { assertTrue(ex.getMessage().contains("Context ...
public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerException("Requests missing....
JiraServerRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTracke...
JiraServerRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTracke...
JiraServerRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTracke...
JiraServerRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTracke...
@Test public void getSettingsKeysTest() { final String key = "key1"; final String key2 = "key2"; final String value1 = "value1"; final String value2 = "value2"; SettingsKeyEntity settingsKeyEntity1 = new SettingsKeyEntity(key, value1); SettingsKeyEntity settingsKeyEntity2 = new SettingsKeyEntity(key2, value2); settings...
@Override public List<SettingsKeyModel> getSettingsKeys() { return settingsKeyRepository.findAll() .stream() .map(this::convertToSettingsKeyModel) .collect(Collectors.toList()); }
DefaultSettingsKeyAccessor implements SettingsKeyAccessor { @Override public List<SettingsKeyModel> getSettingsKeys() { return settingsKeyRepository.findAll() .stream() .map(this::convertToSettingsKeyModel) .collect(Collectors.toList()); } }
DefaultSettingsKeyAccessor implements SettingsKeyAccessor { @Override public List<SettingsKeyModel> getSettingsKeys() { return settingsKeyRepository.findAll() .stream() .map(this::convertToSettingsKeyModel) .collect(Collectors.toList()); } DefaultSettingsKeyAccessor(SettingsKeyRepository settingsKeyRepository); }
DefaultSettingsKeyAccessor implements SettingsKeyAccessor { @Override public List<SettingsKeyModel> getSettingsKeys() { return settingsKeyRepository.findAll() .stream() .map(this::convertToSettingsKeyModel) .collect(Collectors.toList()); } DefaultSettingsKeyAccessor(SettingsKeyRepository settingsKeyRepository); @Overri...
DefaultSettingsKeyAccessor implements SettingsKeyAccessor { @Override public List<SettingsKeyModel> getSettingsKeys() { return settingsKeyRepository.findAll() .stream() .map(this::convertToSettingsKeyModel) .collect(Collectors.toList()); } DefaultSettingsKeyAccessor(SettingsKeyRepository settingsKeyRepository); @Overri...
@Test public void testRequestsNull() throws Exception { JiraServerRequestDelegator service = new JiraServerRequestDelegator(gson, createContext()); List<IssueTrackerRequest> requests = null; try { service.sendRequests(requests); fail(); } catch (IssueTrackerException ex) { assertTrue(ex.getMessage().contains("Requests ...
public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerException("Requests missing....
JiraServerRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTracke...
JiraServerRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTracke...
JiraServerRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTracke...
JiraServerRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTracke...
@Test public void testRequestsEmpty() throws Exception { JiraServerRequestDelegator service = new JiraServerRequestDelegator(gson, createContext()); List<IssueTrackerRequest> requests = new ArrayList<>(); try { service.sendRequests(requests); fail(); } catch (IssueTrackerException ex) { assertTrue(ex.getMessage().conta...
public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerException("Requests missing....
JiraServerRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTracke...
JiraServerRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTracke...
JiraServerRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTracke...
JiraServerRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTracke...
@Test public void testAppMissing() throws Exception { JiraServerChannel jiraServerChannel = new JiraServerChannel(gson, new JiraServerChannelKey(), null, null, null); List<IssueTrackerRequest> requests = new ArrayList<>(); IssueContentModel content = createContentModel(); IssueSearchProperties searchProperties = create...
public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerException("Requests missing....
JiraServerRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTracke...
JiraServerRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTracke...
JiraServerRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTracke...
JiraServerRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTracke...
@Test public void testCreateIssue() throws Exception { Mockito.when(pluginManagerService.isAppInstalled(Mockito.eq(JiraConstants.JIRA_APP_KEY))).thenReturn(true); List<ProjectComponent> projectComponents = new ArrayList<>(); projectComponents.add(new ProjectComponent(null, "1", "project", "project", null, null, null, n...
public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerException("Requests missing....
JiraServerRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTracke...
JiraServerRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTracke...
JiraServerRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTracke...
JiraServerRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTracke...
@Test public void testResolveIssue() throws Exception { Mockito.when(pluginManagerService.isAppInstalled(Mockito.eq(JiraConstants.JIRA_APP_KEY))).thenReturn(true); List<ProjectComponent> projectComponents = new ArrayList<>(); projectComponents.add(new ProjectComponent(null, "1", "project", "project", null, null, null, ...
public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerException("Requests missing....
JiraServerRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTracke...
JiraServerRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTracke...
JiraServerRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTracke...
JiraServerRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Server instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTracke...
@Test public void testContextNull() throws Exception { JiraCloudRequestDelegator service = new JiraCloudRequestDelegator(gson, null); List<IssueTrackerRequest> requests = new ArrayList<>(); try { service.sendRequests(requests); fail(); } catch (IssueTrackerException ex) { assertTrue(ex.getMessage().contains("Context mi...
public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerException("Requests missing. ...
JiraCloudRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerE...
JiraCloudRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerE...
JiraCloudRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerE...
JiraCloudRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerE...
@Test public void testRequestsNull() throws Exception { JiraCloudRequestDelegator service = new JiraCloudRequestDelegator(gson, createContext()); List<IssueTrackerRequest> requests = null; try { service.sendRequests(requests); fail(); } catch (IssueTrackerException ex) { assertTrue(ex.getMessage().contains("Requests mi...
public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerException("Requests missing. ...
JiraCloudRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerE...
JiraCloudRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerE...
JiraCloudRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerE...
JiraCloudRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerE...
@Test public void testRequestsEmpty() throws Exception { JiraCloudRequestDelegator service = new JiraCloudRequestDelegator(gson, createContext()); List<IssueTrackerRequest> requests = new ArrayList<>(); try { service.sendRequests(requests); fail(); } catch (IssueTrackerException ex) { assertTrue(ex.getMessage().contain...
public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerException("Requests missing. ...
JiraCloudRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerE...
JiraCloudRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerE...
JiraCloudRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerE...
JiraCloudRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerE...
@Test public void testAppMissing() throws Exception { JiraCloudRequestDelegator service = new JiraCloudRequestDelegator(gson, createContext()); List<IssueTrackerRequest> requests = new ArrayList<>(); IssueContentModel content = createContentModel(); IssueSearchProperties searchProperties = createSearchProperties(); Ale...
public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerException("Requests missing. ...
JiraCloudRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerE...
JiraCloudRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerE...
JiraCloudRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerE...
JiraCloudRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerE...
@Test public void testCreateIssue() throws Exception { Mockito.when(jiraAppService.isAppInstalled(Mockito.eq(JiraConstants.JIRA_APP_KEY))).thenReturn(true); List<ProjectComponent> pageComponents = new ArrayList<>(); pageComponents.add(new ProjectComponent(null, "1", "project", "project", null, null, null, null)); PageO...
public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerException("Requests missing. ...
JiraCloudRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerE...
JiraCloudRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerE...
JiraCloudRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerE...
JiraCloudRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerE...
@Test public void getSettingsByKeyTest() { final String key = "key1"; final String value1 = "value1"; SettingsKeyEntity settingsKeyEntity = new SettingsKeyEntity(key, value1); settingsKeyEntity.setId(1L); SettingsKeyRepository settingsKeyRepository = new MockSettingsKeyRepository(); settingsKeyRepository.save(settingsK...
@Override public Optional<SettingsKeyModel> getSettingsKeyByKey(String key) { return settingsKeyRepository.findByKey(key).map(this::convertToSettingsKeyModel); }
DefaultSettingsKeyAccessor implements SettingsKeyAccessor { @Override public Optional<SettingsKeyModel> getSettingsKeyByKey(String key) { return settingsKeyRepository.findByKey(key).map(this::convertToSettingsKeyModel); } }
DefaultSettingsKeyAccessor implements SettingsKeyAccessor { @Override public Optional<SettingsKeyModel> getSettingsKeyByKey(String key) { return settingsKeyRepository.findByKey(key).map(this::convertToSettingsKeyModel); } DefaultSettingsKeyAccessor(SettingsKeyRepository settingsKeyRepository); }
DefaultSettingsKeyAccessor implements SettingsKeyAccessor { @Override public Optional<SettingsKeyModel> getSettingsKeyByKey(String key) { return settingsKeyRepository.findByKey(key).map(this::convertToSettingsKeyModel); } DefaultSettingsKeyAccessor(SettingsKeyRepository settingsKeyRepository); @Override List<SettingsKe...
DefaultSettingsKeyAccessor implements SettingsKeyAccessor { @Override public Optional<SettingsKeyModel> getSettingsKeyByKey(String key) { return settingsKeyRepository.findByKey(key).map(this::convertToSettingsKeyModel); } DefaultSettingsKeyAccessor(SettingsKeyRepository settingsKeyRepository); @Override List<SettingsKe...
@Test public void testResolveIssue() throws Exception { Mockito.when(jiraAppService.isAppInstalled(Mockito.eq(JiraConstants.JIRA_APP_KEY))).thenReturn(true); List<ProjectComponent> pageComponents = new ArrayList<>(); pageComponents.add(new ProjectComponent(null, "1", "project", "project", null, null, null, null)); Page...
public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerException("Requests missing. ...
JiraCloudRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerE...
JiraCloudRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerE...
JiraCloudRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerE...
JiraCloudRequestDelegator { public IssueTrackerResponse sendRequests(List<IssueTrackerRequest> requests) throws IntegrationException { if (null == context) { throw new IssueTrackerException("Context missing. Cannot determine Jira Cloud instance."); } if (null == requests || requests.isEmpty()) { throw new IssueTrackerE...
@Test public void validateSuccessTest() throws IntegrationException { ProjectService projectService = Mockito.mock(ProjectService.class); UserSearchService userSearchService = Mockito.mock(UserSearchService.class); IssueTypeService issueTypeService = Mockito.mock(IssueTypeService.class); IssueMetaDataService issueMetaD...
@Override public Collection<ProjectComponent> getProjectsByName(String jiraProjectName) throws IntegrationException { PageOfProjectsResponseModel projectsResponseModel = projectService.getProjectsByName(jiraProjectName); return projectsResponseModel.getProjects(); }
JiraCloudIssueConfigValidator extends JiraIssueConfigValidator { @Override public Collection<ProjectComponent> getProjectsByName(String jiraProjectName) throws IntegrationException { PageOfProjectsResponseModel projectsResponseModel = projectService.getProjectsByName(jiraProjectName); return projectsResponseModel.getPr...
JiraCloudIssueConfigValidator extends JiraIssueConfigValidator { @Override public Collection<ProjectComponent> getProjectsByName(String jiraProjectName) throws IntegrationException { PageOfProjectsResponseModel projectsResponseModel = projectService.getProjectsByName(jiraProjectName); return projectsResponseModel.getPr...
JiraCloudIssueConfigValidator extends JiraIssueConfigValidator { @Override public Collection<ProjectComponent> getProjectsByName(String jiraProjectName) throws IntegrationException { PageOfProjectsResponseModel projectsResponseModel = projectService.getProjectsByName(jiraProjectName); return projectsResponseModel.getPr...
JiraCloudIssueConfigValidator extends JiraIssueConfigValidator { @Override public Collection<ProjectComponent> getProjectsByName(String jiraProjectName) throws IntegrationException { PageOfProjectsResponseModel projectsResponseModel = projectService.getProjectsByName(jiraProjectName); return projectsResponseModel.getPr...
@Test public void testServerServiceFactory() { try { JiraCloudProperties properties = new JiraCloudProperties("http: JiraCloudServiceFactory serviceFactory = properties.createJiraServicesCloudFactory(LoggerFactory.getLogger(getClass()), new Gson()); assertNotNull(serviceFactory); } catch (IssueTrackerException ex) { ex...
public JiraCloudServiceFactory createJiraServicesCloudFactory(Logger logger, Gson gson) throws IssueTrackerException { JiraCloudRestConfig jiraServerConfig = createJiraServerConfig(); Slf4jIntLogger intLogger = new Slf4jIntLogger(logger); JiraHttpClient jiraHttpClient = jiraServerConfig.createJiraHttpClient(intLogger);...
JiraCloudProperties implements IssueTrackerServiceConfig { public JiraCloudServiceFactory createJiraServicesCloudFactory(Logger logger, Gson gson) throws IssueTrackerException { JiraCloudRestConfig jiraServerConfig = createJiraServerConfig(); Slf4jIntLogger intLogger = new Slf4jIntLogger(logger); JiraHttpClient jiraHtt...
JiraCloudProperties implements IssueTrackerServiceConfig { public JiraCloudServiceFactory createJiraServicesCloudFactory(Logger logger, Gson gson) throws IssueTrackerException { JiraCloudRestConfig jiraServerConfig = createJiraServerConfig(); Slf4jIntLogger intLogger = new Slf4jIntLogger(logger); JiraHttpClient jiraHtt...
JiraCloudProperties implements IssueTrackerServiceConfig { public JiraCloudServiceFactory createJiraServicesCloudFactory(Logger logger, Gson gson) throws IssueTrackerException { JiraCloudRestConfig jiraServerConfig = createJiraServerConfig(); Slf4jIntLogger intLogger = new Slf4jIntLogger(logger); JiraHttpClient jiraHtt...
JiraCloudProperties implements IssueTrackerServiceConfig { public JiraCloudServiceFactory createJiraServicesCloudFactory(Logger logger, Gson gson) throws IssueTrackerException { JiraCloudRestConfig jiraServerConfig = createJiraServerConfig(); Slf4jIntLogger intLogger = new Slf4jIntLogger(logger); JiraHttpClient jiraHtt...
@Test public void testResponseBodyBuilder() { ResponseBodyBuilder responseBodyBuilder = new ResponseBodyBuilder("55L", "Message"); responseBodyBuilder.put("Key1", "Value"); responseBodyBuilder.put("Key2", 22); responseBodyBuilder.put("Key3", false); assertEquals("{\"id\":\"55L\",\"message\":\"Message\",\"Key1\":\"Value...
public ResponseBodyBuilder() { map = new JsonObject(); }
ResponseBodyBuilder { public ResponseBodyBuilder() { map = new JsonObject(); } }
ResponseBodyBuilder { public ResponseBodyBuilder() { map = new JsonObject(); } ResponseBodyBuilder(); ResponseBodyBuilder(String id, String message); ResponseBodyBuilder(String message); }
ResponseBodyBuilder { public ResponseBodyBuilder() { map = new JsonObject(); } ResponseBodyBuilder(); ResponseBodyBuilder(String id, String message); ResponseBodyBuilder(String message); ResponseBodyBuilder put(String key, Boolean value); ResponseBodyBuilder put(String key, Number value); ResponseBodyBuilder put(Stri...
ResponseBodyBuilder { public ResponseBodyBuilder() { map = new JsonObject(); } ResponseBodyBuilder(); ResponseBodyBuilder(String id, String message); ResponseBodyBuilder(String message); ResponseBodyBuilder put(String key, Boolean value); ResponseBodyBuilder put(String key, Number value); ResponseBodyBuilder put(Stri...