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