aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/errors/VendorSoftwareProductCreationFailedBuilderTest.java
blob: 921881d322fac2d14f50d00ec189ab755dc7c97e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package org.openecomp.sdc.vendorsoftwareproduct.dao.errors;

import static org.openecomp.sdc.vendorsoftwareproduct.errors.VendorSoftwareProductErrorCodes.FAILED_TO_CREATE_VSP;

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 VendorSoftwareProductCreationFailedBuilderTest {

    private static final String VSP_ID = "testVsp1";
    private VendorSoftwareProductCreationFailedBuilder vendorSoftwareProductCreationFailedBuilder;

    @Before
    public void setUp() {
        vendorSoftwareProductCreationFailedBuilder = new VendorSoftwareProductCreationFailedBuilder(VSP_ID);
    }

    @Test
    public void shouldReturnVspNotFoundErrorCode(){
        ErrorCode actual = vendorSoftwareProductCreationFailedBuilder.build();
        Assert.assertEquals(actual.category(), ErrorCategory.APPLICATION);
        Assert.assertEquals(actual.id(), FAILED_TO_CREATE_VSP);
    }
}