summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/test/java/org/openecomp/sdc/versioning/errors/EditOnUnlockedEntityErrorBuilderTest.java
blob: b2287611fc61d5f8047cf4d2f5c32c29a82af8f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package org.openecomp.sdc.versioning.errors;


import org.junit.Assert;
import org.junit.Test;
import org.openecomp.sdc.common.errors.ErrorCategory;
import org.openecomp.sdc.common.errors.ErrorCode;

public class EditOnUnlockedEntityErrorBuilderTest {
    @Test
    public void test() {
        EditOnUnlockedEntityErrorBuilder builder = new EditOnUnlockedEntityErrorBuilder("entityType",
                "entityId");

        ErrorCode build = builder.build();
        Assert.assertEquals(VersioningErrorCodes.EDIT_ON_UNLOCKED_ENTITY, build.id());
        Assert.assertEquals(ErrorCategory.APPLICATION, build.category());
        Assert.assertEquals(String.format(EditOnUnlockedEntityErrorBuilder.EDIT_ON_UNLOCKED_ENTITY_MSG,
                "entityType", "entityId"), build.message());
    }
}