9cf5cab361cd7b87f1341e1c10c04a1d632dcde5
[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 EntityNotExistErrorBuilderTest {
10     @Test
11     public void test() {
12         EntityNotExistErrorBuilder builder = new EntityNotExistErrorBuilder("entityType",
13                 "entityId");
14         ErrorCode build = builder.build();
15         Assert.assertEquals(VersioningErrorCodes.VERSIONABLE_ENTITY_NOT_EXIST, build.id());
16         Assert.assertEquals(ErrorCategory.APPLICATION, build.category());
17         Assert.assertEquals(String.format(EntityNotExistErrorBuilder.VERSIONABLE_ENTITY_NOT_EXIST_MSG,
18                 "entityType", "entityId"), build.message());
19     }
20 }