921881d322fac2d14f50d00ec189ab755dc7c97e
[sdc.git] /
1 package org.openecomp.sdc.vendorsoftwareproduct.dao.errors;
2
3 import static org.openecomp.sdc.vendorsoftwareproduct.errors.VendorSoftwareProductErrorCodes.FAILED_TO_CREATE_VSP;
4
5 import org.junit.Before;
6 import org.junit.Test;
7 import org.openecomp.sdc.common.errors.ErrorCategory;
8 import org.openecomp.sdc.common.errors.ErrorCode;
9 import org.testng.Assert;
10
11 public class VendorSoftwareProductCreationFailedBuilderTest {
12
13     private static final String VSP_ID = "testVsp1";
14     private VendorSoftwareProductCreationFailedBuilder vendorSoftwareProductCreationFailedBuilder;
15
16     @Before
17     public void setUp() {
18         vendorSoftwareProductCreationFailedBuilder = new VendorSoftwareProductCreationFailedBuilder(VSP_ID);
19     }
20
21     @Test
22     public void shouldReturnVspNotFoundErrorCode(){
23         ErrorCode actual = vendorSoftwareProductCreationFailedBuilder.build();
24         Assert.assertEquals(actual.category(), ErrorCategory.APPLICATION);
25         Assert.assertEquals(actual.id(), FAILED_TO_CREATE_VSP);
26     }
27 }