summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/test/java/org/openecomp/sdc/versioning/errors/UndoCheckoutOnEntityLockedByOtherErrorBuilderTest.java
blob: e19fec0777c1c63b2eee1e5166bb1a688bff52d0 (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 UndoCheckoutOnEntityLockedByOtherErrorBuilderTest {
    @Test
    public void test() {

        UndoCheckoutOnEntityLockedByOtherErrorBuilder builder = new UndoCheckoutOnEntityLockedByOtherErrorBuilder("entityType",
                "entityId", "lockingUser");

        ErrorCode build = builder.build();
        Assert.assertEquals(VersioningErrorCodes.UNDO_CHECKOUT_ON_ENTITY_LOCKED_BY_OTHER_USER, build.id());
        Assert.assertEquals(ErrorCategory.APPLICATION, build.category());
        Assert.assertEquals(String.format(UndoCheckoutOnEntityLockedByOtherErrorBuilder.UNDO_CHECKOUT_ON_ENTITY_LOCKED_BY_OTHER_USER_MSG,
                "entityType", "entityId", "lockingUser"), build.message());
    }
}