move BeforeEach to top of class
This commit is contained in:
parent
ab35aeabf7
commit
9439463838
|
@ -15,6 +15,12 @@ public class LastNCharactersUnitTest {
|
|||
private String s;
|
||||
private int n;
|
||||
|
||||
@BeforeEach
|
||||
void init() {
|
||||
s = "10-03-2024";
|
||||
n = 4;
|
||||
}
|
||||
|
||||
@Test
|
||||
void givenString_whenUsingIntStreamAsStreamSource_thenObtainLastNCharacters() {
|
||||
String result = s.chars()
|
||||
|
@ -55,10 +61,4 @@ public class LastNCharactersUnitTest {
|
|||
|
||||
assertThat(result).isEqualTo("2024");
|
||||
}
|
||||
|
||||
@BeforeEach
|
||||
void init() {
|
||||
s = "10-03-2024";
|
||||
n = 4;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue