e19fec0777c1c63b2eee1e5166bb1a688bff52d0
[sdc.git] /
1 package org.openecomp.sdc.versioning.errors;
2
3
4 import org.junit.Assert;
5 import org.junit.Test;
6 import org.openecomp.sdc.common.errors.ErrorCategory;
7 import org.openecomp.sdc.common.errors.ErrorCode;
8
9 public class UndoCheckoutOnEntityLockedByOtherErrorBuilderTest {
10     @Test
11     public void test() {
12
13         UndoCheckoutOnEntityLockedByOtherErrorBuilder builder = new UndoCheckoutOnEntityLockedByOtherErrorBuilder("entityType",
14                 "entityId", "lockingUser");
15
16         ErrorCode build = builder.build();
17         Assert.assertEquals(VersioningErrorCodes.UNDO_CHECKOUT_ON_ENTITY_LOCKED_BY_OTHER_USER, build.id());
18         Assert.assertEquals(ErrorCategory.APPLICATION, build.category());
19         Assert.assertEquals(String.format(UndoCheckoutOnEntityLockedByOtherErrorBuilder.UNDO_CHECKOUT_ON_ENTITY_LOCKED_BY_OTHER_USER_MSG,
20                 "entityType", "entityId", "lockingUser"), build.message());
21     }
22 }