From ecf153f17d36e5b5b584992a41bf276c6aaada93 Mon Sep 17 00:00:00 2001 From: Ashley <73482956+ascopes@users.noreply.github.com> Date: Sun, 22 Dec 2024 21:54:54 +0000 Subject: [PATCH] Update AbstractGenerateMojoTestTemplate.java --- .../mojo/AbstractGenerateMojoTestTemplate.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protobuf-maven-plugin/src/test/java/io/github/ascopes/protobufmavenplugin/mojo/AbstractGenerateMojoTestTemplate.java b/protobuf-maven-plugin/src/test/java/io/github/ascopes/protobufmavenplugin/mojo/AbstractGenerateMojoTestTemplate.java index 4502702d..d157e5c9 100644 --- a/protobuf-maven-plugin/src/test/java/io/github/ascopes/protobufmavenplugin/mojo/AbstractGenerateMojoTestTemplate.java +++ b/protobuf-maven-plugin/src/test/java/io/github/ascopes/protobufmavenplugin/mojo/AbstractGenerateMojoTestTemplate.java @@ -891,7 +891,7 @@ class DescriptorFileTest { void whenDescriptorFileProvidedExpectProvidedDirectoryToBeUsed( @TempDir Path tempDir ) throws Throwable { - Path expectedDescriptorFile = Files.createFile(tempDir.resolve("protobin.desc")); + var expectedDescriptorFile = Files.createFile(tempDir.resolve("protobin.desc")); // Given mojo.outputDescriptorFile = expectedDescriptorFile.toFile(); @@ -902,7 +902,7 @@ void whenDescriptorFileProvidedExpectProvidedDirectoryToBeUsed( var captor = ArgumentCaptor.forClass(GenerationRequest.class); verify(mojo.sourceCodeGenerator).generate(captor.capture()); var actualRequest = captor.getValue(); - assertThat(actualRequest.getOutputDescriptorFile()).isEqualTo(expectedDescriptorFile); + assertThat(actualRequest.getOutputDescriptorFile()).isEqualTo(expectedDescriptorFile.toPath()); } }