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