Skip to content

Commit

Permalink
Renamed: Base64Text to Base64Decoded, TextBase64 to Base64Encoded (ye…
Browse files Browse the repository at this point in the history
  • Loading branch information
igor committed Jan 16, 2019
1 parent de9031f commit ffdb262
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,15 @@
/**
* Decodes the origin text using the Base64 encoding scheme.
* @since 0.20.2
* @todo #980:30min Define new name for Base64Text and TextBase64 in order to
* avoid compound names. These classes are using for decode/encode text using
* the radix-64 representation.
*/
public final class Base64Text extends TextEnvelope {
public final class Base64Decoded extends TextEnvelope {

/**
* Ctor.
*
* @param input The String
*/
public Base64Text(final String input) {
public Base64Decoded(final String input) {
this(new TextOf(input));
}

Expand All @@ -51,7 +48,7 @@ public Base64Text(final String input) {
*
* @param origin Origin text
*/
public Base64Text(final Text origin) {
public Base64Decoded(final Text origin) {
super(new TextOf(
new Base64Bytes(
new BytesOf(origin)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
*
* @since 0.20.2
*/
public final class TextBase64 extends TextEnvelope {
public final class Base64Encoded extends TextEnvelope {

/**
* Ctor.
*
* @param input The String
*/
public TextBase64(final String input) {
public Base64Encoded(final String input) {
this(new TextOf(input));
}

Expand All @@ -50,7 +50,7 @@ public TextBase64(final String input) {
*
* @param origin Origin text
*/
public TextBase64(final Text origin) {
public Base64Encoded(final Text origin) {
super((Scalar<String>) () -> new TextOf(
new BytesBase64(
new BytesOf(origin)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
import org.llorllale.cactoos.matchers.TextHasString;

/**
* Test Case for {@link org.cactoos.text.Base64Text}.
* Test Case for {@link Base64Decoded}.
*
* @since 0.20.2
*/
public final class Base64TextTest {
public final class Base64DecodedTest {

/**
* Check text decodes using the Base64 encoding scheme.
Expand All @@ -44,7 +44,7 @@ public final class Base64TextTest {
public void checkDecode() throws IOException {
MatcherAssert.assertThat(
"Can't decodes text using the Base64 encoding scheme",
new Base64Text(
new Base64Decoded(
"SGVsbG8h"
),
new TextHasString(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
import org.llorllale.cactoos.matchers.TextHasString;

/**
* Test case for {@link org.cactoos.text.TextBase64}.
* Test case for {@link Base64Encoded}.
* @since 0.20.2
*/
public final class TextBase64Test {
public final class Base64EncodedTest {

/**
* Check text encodes using the Base64 encoding scheme.
Expand All @@ -43,7 +43,7 @@ public final class TextBase64Test {
public void checkEncode() throws IOException {
MatcherAssert.assertThat(
"Can't encodes text using the Base64 encoding scheme",
new TextBase64(
new Base64Encoded(
"Hello!"
),
new TextHasString(
Expand Down

0 comments on commit ffdb262

Please sign in to comment.