aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/test/java/org/openecomp/sdc/versioning/errors/CheckinOnUnlockedEntityErrorBuilderTest.java
blob: e72eefe7843aed00c4f1e651dca3eb53eed2dbb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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 CheckinOnUnlockedEntityErrorBuilderTest {

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

        ErrorCode build = builder.build();
        Assert.assertEquals(VersioningErrorCodes.CHECKIN_ON_UNLOCKED_ENTITY, build.id());
        Assert.assertEquals(ErrorCategory.APPLICATION, build.category());
        Assert.assertEquals(String.format(CheckinOnUnlockedEntityErrorBuilder.CHECKIN_ON_UNLOCKED_ENTITY_MSG,
                "entityType", "entityId"), build.message());
    }
}