diff options
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/errors/VendorSoftwareProductNotFoundErrorBuilderTest.java')
1 files changed, 27 insertions, 0 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/errors/VendorSoftwareProductNotFoundErrorBuilderTest.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/errors/VendorSoftwareProductNotFoundErrorBuilderTest.java new file mode 100644 index 0000000000..75e6b1f6df --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/errors/VendorSoftwareProductNotFoundErrorBuilderTest.java @@ -0,0 +1,27 @@ +package org.openecomp.sdc.vendorsoftwareproduct.dao.errors; + +import static org.openecomp.sdc.vendorsoftwareproduct.errors.VendorSoftwareProductErrorCodes.VSP_NOT_FOUND; + +import org.junit.Before; +import org.junit.Test; +import org.openecomp.sdc.common.errors.ErrorCategory; +import org.openecomp.sdc.common.errors.ErrorCode; +import org.testng.Assert; + +public class VendorSoftwareProductNotFoundErrorBuilderTest { + + private static final String VSP_ID = "testVsp1"; + private VendorSoftwareProductNotFoundErrorBuilder vendorSoftwareProductNotFoundErrorBuilder; + + @Before + public void setUp() { + vendorSoftwareProductNotFoundErrorBuilder = new VendorSoftwareProductNotFoundErrorBuilder(VSP_ID); + } + + @Test + public void shouldReturnVspNotFoundErrorCode(){ + ErrorCode actual = vendorSoftwareProductNotFoundErrorBuilder.build(); + Assert.assertEquals(actual.category(), ErrorCategory.APPLICATION); + Assert.assertEquals(actual.id(), VSP_NOT_FOUND); + } +} |