Skip to content

Commit 9abf415

Browse files
committed
. t cleanup
1 parent bc2de76 commit 9abf415

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

.windsurf/CodeStyle.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
Remove all comments from the code.
66
If the comment is explaining a block of code, extract the block as a reusable method and give it a name
77
If the comment is explaining a variable, extract one with a name or give an existing variable a better name
8-
Keep comments related to .md snippets (these comments will start with // begin-snippet and end with // end-snippet)
8+
Keep comments related to .md snippets
9+
these comments will start with:
10+
begin-snippet
11+
or
12+
end-snippet
913

1014
## Testing Console output
1115

approvaltests-tests/src/test/java/org/approvaltests/scrubbers/DateScrubberTest.java

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,10 @@ void testAddScrubberDisplaysMessage()
146146
To suppress this message, use:
147147
DateScrubber.addScrubber("<date format>", "<regex>", false)
148148
""";
149-
try
149+
try (ConsoleOutput console = new ConsoleOutput())
150150
{
151-
try (ConsoleOutput console = new ConsoleOutput())
152-
{
153-
DateScrubber.addScrubber("2023-Dec-25", "\\d{4}-[A-Za-z]{3}-\\d{2}");
154-
console.verifyOutput(new Options().inline(expected));
155-
}
151+
DateScrubber.addScrubber("2023-Dec-25", "\\d{4}-[A-Za-z]{3}-\\d{2}");
152+
console.verifyOutput(new Options().inline(expected));
156153
}
157154
finally
158155
{
@@ -162,14 +159,11 @@ void testAddScrubberDisplaysMessage()
162159
@Test
163160
void testAddScrubberSuppressMessage()
164161
{
165-
try
162+
try (ConsoleOutput console = new ConsoleOutput())
166163
{
167-
try (ConsoleOutput console = new ConsoleOutput())
168-
{
169-
DateScrubber.addScrubber("2023-Dec-25", "\\d{4}-[A-Za-z]{3}-\\d{2}", false);
170-
String output = console.getOutput();
171-
assertEquals("", output);
172-
}
164+
DateScrubber.addScrubber("2023-Dec-25", "\\d{4}-[A-Za-z]{3}-\\d{2}", false);
165+
String output = console.getOutput();
166+
assertEquals("", output);
173167
}
174168
finally
175169
{

0 commit comments

Comments
 (0)