Search in sources :

Example 1 with UnknownArtifactTypeException

use of org.apache.maven.plugins.ear.UnknownArtifactTypeException in project maven-plugins by apache.

the class ArtifactTypeMappingServiceTest method testGetStandardTypeForUknonwnType.

public void testGetStandardTypeForUknonwnType() {
    try {
        ArtifactTypeMappingService service = getDefaultService();
        service.getStandardType("MyKoolCustomType");
        fail("Should have failed to retrieve a unknwon custom type");
    } catch (UnknownArtifactTypeException e) {
    // That's good
    }
}
Also used : UnknownArtifactTypeException(org.apache.maven.plugins.ear.UnknownArtifactTypeException) ArtifactTypeMappingService(org.apache.maven.plugins.ear.util.ArtifactTypeMappingService)

Example 2 with UnknownArtifactTypeException

use of org.apache.maven.plugins.ear.UnknownArtifactTypeException in project maven-plugins by apache.

the class ArtifactTypeMappingServiceTest method testGetStandardTypeForKnownType.

public void testGetStandardTypeForKnownType() {
    try {
        ArtifactTypeMappingService service = getServiceWithRarMappingToMyRar();
        assertEquals("rar", service.getStandardType("MyRar"));
    } catch (UnknownArtifactTypeException e) {
        fail("Should not have failed to retrieve a knwon custom type " + e.getMessage());
    }
}
Also used : UnknownArtifactTypeException(org.apache.maven.plugins.ear.UnknownArtifactTypeException) ArtifactTypeMappingService(org.apache.maven.plugins.ear.util.ArtifactTypeMappingService)

Aggregations

UnknownArtifactTypeException (org.apache.maven.plugins.ear.UnknownArtifactTypeException)2 ArtifactTypeMappingService (org.apache.maven.plugins.ear.util.ArtifactTypeMappingService)2