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