75e6b1f6df6eeb8fb770e767e6f17bf7cf4f963c
[sdc.git] /
1 package org.openecomp.sdc.vendorsoftwareproduct.dao.errors;
2
3 import static org.openecomp.sdc.vendorsoftwareproduct.errors.VendorSoftwareProductErrorCodes.VSP_NOT_FOUND;
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 VendorSoftwareProductNotFoundErrorBuilderTest {
12
13     private static final String VSP_ID = "testVsp1";
14     private VendorSoftwareProductNotFoundErrorBuilder vendorSoftwareProductNotFoundErrorBuilder;
15
16     @Before
17     public void setUp() {
18         vendorSoftwareProductNotFoundErrorBuilder = new VendorSoftwareProductNotFoundErrorBuilder(VSP_ID);
19     }
20
21     @Test
22     public void shouldReturnVspNotFoundErrorCode(){
23         ErrorCode actual = vendorSoftwareProductNotFoundErrorBuilder.build();
24         Assert.assertEquals(actual.category(), ErrorCategory.APPLICATION);
25         Assert.assertEquals(actual.id(), VSP_NOT_FOUND);
26     }
27 }