Revert: added to test class for string to char array char array to string conversion

This commit is contained in:
Stephen Braimah 2017-01-11 21:55:15 +00:00
parent de446f5443
commit 3116a73d24
1 changed files with 0 additions and 25 deletions

View File

@ -1,25 +0,0 @@
package com.baeldung.java.conversion;
import org.junit.Test;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
public class StringCharArrayConversionTest {
@Test
public void givenString_whenConvertedToCharArray_ThenCorrect() throws Exception {
String beforeConvCharArr = "Text";
char[] afterConvCharArr = {'T','e','x','t'};
assertArrayEquals(beforeConvCharArr.toCharArray(),afterConvCharArr);
}
@Test
public void givenCharArray_whenConvertedToString_ThenCorrect() throws Exception {
char[] beforeConvStr = {'T','e','x','t'};
String afterConvStr = "Text";
assertEquals(String.valueOf(beforeConvStr),afterConvStr);
}
}