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
public class VectorCreationMethodsTest { | |
private String a = "Angel"; | |
private String b = "Berta"; | |
@Test | |
public void vectorEmpty_Then_AnEmptyVectorIsCreated() { | |
Vector<String> vector = Vector.empty(); | |
assertThat(vector.size()).isEqualTo(0); | |
} |
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
public class PersistenceTest { | |
private String a = "Angel"; | |
private String b = "Marc"; | |
private String c = "Lucy"; | |
private String d = "Bert"; | |
@Test | |
public void givenACyclopsVector_whenTheVectorIsModified_thenPreviousVersionIsNotChanged() { | |
Vector<String> vector = Vector.of(a, b, c); |
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
public class ImmutabilityTest { | |
private String a = "Tom"; | |
private String b = "Marc"; | |
private String c = "Lucy"; | |
private String d = "Bert"; | |
@Test | |
public void givenUsingJava8List_whenListIsCreated_thenListIsMutable() { | |
List<String> java8MutableList = new ArrayList<>(Arrays.asList(a, b, c)); |
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
public class VectorDemoTest { | |
private String a = "Angel"; | |
private String b = "Marc"; | |
private String c = "Lucy"; | |
private String d = "Bert"; | |
@Test | |
public void givenSomeStrings_WhenVectorOf_ThenVectorIsCreated() { | |
Vector<String> vector = Vector.of(a, b, c); |