bc91614c21ec9b5b8bd2a64c7410ac9e65d0ef46
[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 CheckinOnEntityLockedByOtherErrorBuilderTest {
10
11     @Test
12     public void test() {
13         CheckinOnEntityLockedByOtherErrorBuilder builder = new CheckinOnEntityLockedByOtherErrorBuilder("entityType",
14                 "entityId", "lockingUser");
15         ErrorCode build = builder.build();
16
17         Assert.assertEquals(VersioningErrorCodes.CHECKIN_ON_ENTITY_LOCKED_BY_OTHER_USER, build.id());
18         Assert.assertEquals(ErrorCategory.APPLICATION, build.category());
19         Assert.assertEquals(String.format(CheckinOnEntityLockedByOtherErrorBuilder.CHECKIN_ON_ENTITY_LOCKED_BY_OTHER_USER_MSG, "entityType", "entityId", "lockingUser") ,  build.message());
20     }
21
22 }