blob: 860219f85d1ddacf527d46438a8bfef40a38bc0b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package org.openecomp.sdc.versioning.errors;
import org.junit.Assert;
import org.junit.Test;
import org.openecomp.sdc.common.errors.ErrorCategory;
import org.openecomp.sdc.common.errors.ErrorCode;
public class EntityAlreadyFinalizedErrorBuilderTest {
@Test
public void test() {
EntityAlreadyFinalizedErrorBuilder builder = new EntityAlreadyFinalizedErrorBuilder("entityType",
"entityId");
ErrorCode build = builder.build();
Assert.assertEquals(VersioningErrorCodes.SUBMIT_FINALIZED_ENTITY_NOT_ALLOWED, build.id());
Assert.assertEquals(ErrorCategory.APPLICATION, build.category());
Assert.assertEquals(String.format(EntityAlreadyFinalizedErrorBuilder.SUBMIT_FINALIZED_ENTITY_NOT_ALLOWED_MSG,
"entityType", "entityId"), build.message());
}
}
|