|
@ -45,4 +45,16 @@ class Vector2Test { |
|
|
// assert |
|
|
// assert |
|
|
assertThat(expected).isEqualTo(result); |
|
|
assertThat(expected).isEqualTo(result); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
void Vector2_clone_createsClone() { |
|
|
|
|
|
// arrange |
|
|
|
|
|
Vector2 original = new Vector2(1, 8); |
|
|
|
|
|
Vector2 comparator = new Vector2(1, 8); |
|
|
|
|
|
// act |
|
|
|
|
|
Vector2 clone = original.Clone(); |
|
|
|
|
|
original = new Vector2(11, 12); |
|
|
|
|
|
// assert |
|
|
|
|
|
assertThat(clone).isEqualTo(comparator); |
|
|
|
|
|
} |
|
|
} |
|
|
} |