Skip to content

WarFileTest.checkEbextensionsValidityThrowsExceptionNoDir broken. #19

@nhekfqn

Description

@nhekfqn

That test does not actually check that exception is thrown. If no exception is thrown, assert will not be called and test will pass.

@Test
    public void checkEbextensionsValidityThrowsExceptionNoDir()
        throws IOException {
        final ZipFile zip = Mockito.mock(ZipFile.class);
        Mockito.when(zip.getEntry(".ebextensions")).thenReturn(null);
        final WarFile war = new WarFile(zip);
        try {
            war.checkEbextensionsValidity();
        } catch (final MojoFailureException exception) {
            MatcherAssert.assertThat(
                exception.getMessage(),
                Matchers.equalTo(
                    ".ebextensions directory does not exist in the WAR file"
                )
            );
        }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions