-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hidden non-api objects. Refactoring. Removed Of suffix for <mutators>…
…. LengthOf.
- Loading branch information
Showing
16 changed files
with
58 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,28 +21,28 @@ | |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
package org.cactoos.text; | ||
package org.cactoos.func; | ||
|
||
import java.io.IOException; | ||
import org.hamcrest.MatcherAssert; | ||
import org.hamcrest.Matchers; | ||
import org.junit.Test; | ||
|
||
/** | ||
* Test case for {@link TextAsBool}. | ||
* Test case for {@link BoolOf}. | ||
* | ||
* @author Kirill ([email protected]) | ||
* @version $Id$ | ||
* @since 0.2 | ||
* @checkstyle JavadocMethodCheck (500 lines) | ||
*/ | ||
public final class TextAsBoolTest { | ||
public final class BoolOfTest { | ||
|
||
@Test | ||
public void trueTest() throws IOException { | ||
MatcherAssert.assertThat( | ||
"Can't parse 'true' string", | ||
new TextAsBool("true").value(), | ||
new BoolOf("true").value(), | ||
Matchers.equalTo(true) | ||
); | ||
} | ||
|
@@ -51,7 +51,7 @@ public void trueTest() throws IOException { | |
public void falseTest() throws IOException { | ||
MatcherAssert.assertThat( | ||
"Can't parse 'false' string", | ||
new TextAsBool("false").value(), | ||
new BoolOf("false").value(), | ||
Matchers.equalTo(false) | ||
); | ||
} | ||
|
@@ -60,7 +60,7 @@ public void falseTest() throws IOException { | |
public void isFalseIfTextDoesNotRepresentABoolean() throws IOException { | ||
MatcherAssert.assertThat( | ||
"Can't parse a non-boolean string", | ||
new TextAsBool("abc").value(), | ||
new BoolOf("abc").value(), | ||
Matchers.equalTo(false) | ||
); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,35 +21,35 @@ | |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
package org.cactoos.text; | ||
package org.cactoos.func; | ||
|
||
import java.io.IOException; | ||
import org.hamcrest.MatcherAssert; | ||
import org.hamcrest.Matchers; | ||
import org.junit.Test; | ||
|
||
/** | ||
* Test case for {@link TextAsDouble}. | ||
* Test case for {@link DoubleOf}. | ||
* | ||
* @author Kirill ([email protected]) | ||
* @version $Id$ | ||
* @since 0.2 | ||
* @checkstyle JavadocMethodCheck (500 lines) | ||
*/ | ||
public final class TextAsDoubleTest { | ||
public final class DoubleOfTest { | ||
|
||
@Test | ||
public strictfp void numberTest() throws IOException { | ||
MatcherAssert.assertThat( | ||
"Can't parse double number", | ||
new TextAsDouble("185.65156465123").value(), | ||
new DoubleOf("185.65156465123").value(), | ||
// @checkstyle MagicNumber (1 line) | ||
Matchers.equalTo(185.65156465123) | ||
); | ||
} | ||
|
||
@Test(expected = NumberFormatException.class) | ||
public void failsIfTextDoesNotRepresentADouble() throws IOException { | ||
new TextAsDouble("abc").value(); | ||
new DoubleOf("abc").value(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,35 +21,35 @@ | |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
package org.cactoos.text; | ||
package org.cactoos.func; | ||
|
||
import java.io.IOException; | ||
import org.hamcrest.MatcherAssert; | ||
import org.hamcrest.Matchers; | ||
import org.junit.Test; | ||
|
||
/** | ||
* Test case for {@link TextAsFloat}. | ||
* Test case for {@link FloatOf}. | ||
* | ||
* @author Kirill ([email protected]) | ||
* @version $Id$ | ||
* @since 0.2 | ||
* @checkstyle JavadocMethodCheck (500 lines) | ||
*/ | ||
public final class TextAsFloatTest { | ||
public final class FloatOfTest { | ||
|
||
@Test | ||
public strictfp void numberTest() throws IOException { | ||
MatcherAssert.assertThat( | ||
"Can't parse float number", | ||
new TextAsFloat("1656.894").value(), | ||
new FloatOf("1656.894").value(), | ||
// @checkstyle MagicNumber (1 line) | ||
Matchers.equalTo(1656.894F) | ||
); | ||
} | ||
|
||
@Test(expected = NumberFormatException.class) | ||
public void failsIfTextDoesNotRepresentAFloat() throws IOException { | ||
new TextAsFloat("abc").value(); | ||
new FloatOf("abc").value(); | ||
} | ||
} |
Oops, something went wrong.