Skip to content

Commit 70bb30a

Browse files
committed
a reformat code
1 parent e926eec commit 70bb30a

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

approvaltests-tests/src/test/java/org/approvaltests/StoryBoardTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ void gameOfLifeWithDescription()
3838
}
3939
private static class GameOfLife
4040
{
41-
private String deadSymbol = ".";
42-
private String aliveSymbol = "x";
41+
private String deadSymbol = ".";
42+
private String aliveSymbol = "x";
4343
private Function2<Integer, Integer, Boolean> board;
4444
public GameOfLife(Function2<Integer, Integer, Boolean> board)
4545
{
@@ -63,13 +63,13 @@ public String toString()
6363
{
6464
return Grid.print(5, 5, (x, y) -> board.call(x, y) ? aliveSymbol + " " : deadSymbol + " ");
6565
}
66-
67-
public String setAliveCell(String s) {
66+
public String setAliveCell(String s)
67+
{
6868
this.aliveSymbol = s;
6969
return s;
7070
}
71-
72-
public String setDeadCell(String s) {
71+
public String setDeadCell(String s)
72+
{
7373
this.deadSymbol = s;
7474
return s;
7575
}

approvaltests/src/main/java/org/approvaltests/StoryBoard.java

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,17 @@
44

55
public class StoryBoard
66
{
7-
private StringBuffer stringBuffer = new StringBuffer();
8-
int index = 0;
9-
private boolean newLineNeeded = false;
10-
7+
private StringBuffer stringBuffer = new StringBuffer();
8+
int index = 0;
9+
private boolean newLineNeeded = false;
1110
public static <T> StoryBoard createSequence(T initial, int additionalFrames, Function0<T> getNextFrame)
1211
{
1312
return new StoryBoard().add(initial).addFrames(additionalFrames, getNextFrame);
1413
}
1514
public <T> StoryBoard add(T object)
1615
{
1716
String title = index == 0 ? "Initial" : "Frame #" + index;
18-
return addFrame(title,object);
17+
return addFrame(title, object);
1918
}
2019
public <T> StoryBoard addFrame(String title, T frame)
2120
{
@@ -32,27 +31,29 @@ public <T> StoryBoard addFrames(int howMany, Function0<T> getNextFrame)
3231
}
3332
return this;
3433
}
35-
3634
@Override
3735
public String toString()
3836
{
3937
return stringBuffer.toString();
4038
}
41-
public void addDescription(String game_of_life) {
39+
public void addDescription(String game_of_life)
40+
{
4241
stringBuffer.append(game_of_life);
4342
stringBuffer.append("\n");
4443
stringBuffer.append("\n");
4544
}
46-
47-
public <T> StoryBoard addFrame(T frame) {
45+
public <T> StoryBoard addFrame(T frame)
46+
{
4847
return add(frame);
4948
}
50-
51-
public <T> StoryBoard addDescriptionWithData(String description, String data) {
52-
if (newLineNeeded) {
49+
public <T> StoryBoard addDescriptionWithData(String description, String data)
50+
{
51+
if (newLineNeeded)
52+
{
5353
stringBuffer.append("\n");
5454
}
55-
else{
55+
else
56+
{
5657
stringBuffer.append("\n\n");
5758
}
5859
newLineNeeded = true;

0 commit comments

Comments
 (0)