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