Skip to content

Commit

Permalink
6.0.7. Массивы в тестах.;
Browse files Browse the repository at this point in the history
  • Loading branch information
Temzor committed Sep 26, 2023
1 parent 60282bb commit b7929f0
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/test/java/ru/j4j/array/SquareTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package ru.j4j.array;

import static org.assertj.core.api.Assertions.*;

import org.junit.jupiter.api.Test;

class SquareTest {
@Test
void whenBound3Then014() {
int bound = 3;
int[] result = Square.calculate(bound);
int[] expected = new int[] {0, 1, 4};
assertThat(result).containsExactly(expected);
}

@Test
void whenBound5Then014916() {
int bound = 5;
int[] result = Square.calculate(bound);
int[] expected = new int[] {0, 1, 4, 9, 16};
assertThat(result).containsExactly(expected);
}
}

0 comments on commit b7929f0

Please sign in to comment.