Unit Test failure: Non existent view: error0

I am writing a custom transformation snap to build a custom payload for one of our external systems. I have implemented the ErrorSchemaProvider interface and, following the patterns of the view names from the InputSchemaProvider and OutputSchemaProvider, I specified the view name as “error0”.

@Override
public void defineErrorSchema(final SchemaProvider provider) {
    provider.getSchemaBuilder("error0")
        .withChildSchema(provider.createSchema(SnapType.STRING, BAR_NUMBER))
        .withChildSchema(provider.createSchema(SnapType.STRING, ERROR_TYPE))
        .withChildSchema(provider.createSchema(SnapType.STRING, ERROR_MESSAGE))
        .build();
}

Unfortunately, this is causing the unit test to fail with the error: Non existent view: error0

@RunWith(SnapTestRunner.class)
public class AddAttorneyPayloadBuilderTest {

@TestFixture(snap = AddAttorneyPayloadBuilder.class,
    input = "data/add_attorney/input.json",
    errors = { "error0" },
    expectedOutputPath = "data/add_attorney/expected",
    expectedErrorPath = "data/two_inputs_two_outputs/expected")
public void addAttorney_WithValidData_BuildsXmlPayload() { }

}

I am clearly doing something stupid. Any pointers at what I need to do to fix the problem?

Thanks,
Robert

Hi Robert,

No, you’re not doing anything stupid. You found another issue with our test harness, and it’s already been fixed. Please see the patch info here.

@ptaylor I followed the instructions to add the following properties to the POM but I am still getting the error.

<snaplogic.platform.version>4.22.8138</snaplogic.platform.version>
<snaplogic.snaps.version>4.22.6586</snaplogic.snaps.version>

Nevermind, I regenerated the project with the archetype this weekend and ended up with the older POM somehow…