From 0943a81bec7b3327b9b3e706d928af00cf49b4ed Mon Sep 17 00:00:00 2001 From: Ned Twigg Date: Sat, 15 Jul 2023 19:47:21 -0700 Subject: [PATCH] Fix BufStepTest for the changes we've had in test infrastructure. --- .../java/com/diffplug/spotless/protobuf/BufStepTest.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/testlib/src/test/java/com/diffplug/spotless/protobuf/BufStepTest.java b/testlib/src/test/java/com/diffplug/spotless/protobuf/BufStepTest.java index 9b5fa2fcf5..ce22eb5ed2 100644 --- a/testlib/src/test/java/com/diffplug/spotless/protobuf/BufStepTest.java +++ b/testlib/src/test/java/com/diffplug/spotless/protobuf/BufStepTest.java @@ -15,19 +15,18 @@ */ package com.diffplug.spotless.protobuf; -import java.io.File; - import org.junit.jupiter.api.Test; +import com.diffplug.spotless.ResourceHarness; import com.diffplug.spotless.StepHarnessWithFile; import com.diffplug.spotless.tag.BufTest; @BufTest -class BufStepTest { +class BufStepTest extends ResourceHarness { @Test void test() throws Exception { - try (StepHarnessWithFile harness = StepHarnessWithFile.forStep(BufStep.withVersion(BufStep.defaultVersion()).create())) { - harness.testResource(new File("src/main/resources/protobuf/buf/buf.proto"), "protobuf/buf/buf.proto", "protobuf/buf/buf.proto.clean"); + try (StepHarnessWithFile harness = StepHarnessWithFile.forStep(this, BufStep.withVersion(BufStep.defaultVersion()).create())) { + harness.testResource("protobuf/buf/buf.proto", "protobuf/buf/buf.proto.clean"); } } }