Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienvermeille committed Aug 23, 2024
1 parent 90ee894 commit 8881e9a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
*/
package dev.cookiecode.stylesniffer.annotation.processor;

import static java.util.stream.Collectors.toList;

import dev.cookiecode.stylesniffer.annotation.RegisterCaseStyle;
import java.lang.annotation.Annotation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,14 @@ class FileWriterTest {

@Test
void writeToFileShouldThrowAnIOExceptionGivenThereIsAnIssue() throws Exception {
// GIVEN
final var filerMock = mock(Filer.class);
doThrow(new IOException("IO error")).when(filerMock).createSourceFile(anyString());
when(processingEnvironment.getFiler()).thenReturn(filerMock);

final var someValidCode = "some code that is not generating any error.";
// GIVEN
final var filerMock = mock(Filer.class);
doThrow(new IOException("IO error")).when(filerMock).createSourceFile(anyString());
when(processingEnvironment.getFiler()).thenReturn(filerMock);

final var someValidCode = "some code that is not generating any error.";

assertThrows(
assertThrows(
IOException.class,
() -> {
// WHEN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import javax.annotation.processing.ProcessingEnvironment;
import javax.annotation.processing.RoundEnvironment;
import lombok.NonNull;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InjectMocks;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ void getSupportedCaseStylesShouldContainsPascalCaseGivenPascalCaseImplementation

// THEN
assertThat(actuallySupportedCaseStyle)
.containsAll(pascalCaseStyle.getVariantNames())
.contains(pascalCaseStyle.getName());
.containsAll(pascalCaseStyle.getVariantNames())
.contains(pascalCaseStyle.getName());
}
}

0 comments on commit 8881e9a

Please sign in to comment.