rename result and sure in Guess to language and safe

Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
This commit is contained in:
Miguel Molina 2017-08-09 11:29:45 +02:00
parent 61827a3630
commit 4da1c5605c
No known key found for this signature in database
GPG Key ID: D8826D1B86D051EA
2 changed files with 10 additions and 10 deletions

View File

@ -6,18 +6,18 @@ package tech.sourced.enry;
*/ */
public class Guess { public class Guess {
/** /**
* Result is the resultant language of the detection. * The resultant language of the detection.
*/ */
public String result; public String language;
/** /**
* Sure indicates whether the enry was completely sure the language is * Indicates whether the enry was completely sure the language is
* the correct one or it might not be. * the correct one or it might not be.
*/ */
public boolean sure; public boolean safe;
public Guess(String result, boolean sure) { public Guess(String language, boolean safe) {
this.result = result; this.language = language;
this.sure = sure; this.safe = safe;
} }
} }

View File

@ -141,9 +141,9 @@ public class EnryTest {
assertFalse(Enry.isImage("nope.go")); assertFalse(Enry.isImage("nope.go"));
} }
void assertGuess(String language, boolean sure, Guess result) { void assertGuess(String language, boolean safe, Guess guess) {
assertEquals(language, result.result); assertEquals(language, guess.language);
assertEquals(sure, result.sure); assertEquals(safe, guess.safe);
} }
} }