Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0cfebce

Browse files
add tests for 1861
1 parent94b7cbc commit0cfebce

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
packagecom.fishercoder;
2+
3+
importcom.fishercoder.solutions._1861;
4+
importorg.junit.BeforeClass;
5+
importorg.junit.Test;
6+
7+
importstaticorg.junit.Assert.assertEquals;
8+
9+
publicclass_1861Test {
10+
privatestatic_1861.Solution1solution1;
11+
12+
@BeforeClass
13+
publicstaticvoidsetup() {
14+
solution1 =new_1861.Solution1();
15+
}
16+
17+
@Test
18+
publicvoidtest1() {
19+
assertEquals(newchar[][]{{'.'}, {'#'}, {'#'}},solution1.rotateTheBox(newchar[][]{
20+
{'#','.','#'}
21+
}));
22+
}
23+
24+
@Test
25+
publicvoidtest2() {
26+
assertEquals(newchar[][]{
27+
{'#','.'},
28+
{'#','#'},
29+
{'*','*'},
30+
{'.','.'}},
31+
solution1.rotateTheBox(newchar[][]{
32+
{'#','.','*','.'},
33+
{'#','#','*','.'}
34+
}));
35+
}
36+
37+
@Test
38+
publicvoidtest3() {
39+
assertEquals(newchar[][]{
40+
{'.','#','#'},
41+
{'.','#','#'},
42+
{'#','#','*'},
43+
{'#','*','.'},
44+
{'#','.','*'},
45+
{'#','.','.'}
46+
},
47+
solution1.rotateTheBox(newchar[][]{
48+
{'#','#','*','.','*','.'},
49+
{'#','#','#','*','.','.'},
50+
{'#','#','#','.','#','.'}
51+
}));
52+
}
53+
54+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp