diff options
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/test/java/org/openecomp/sdc/versioning/errors/CheckoutOnLockedEntityErrorBuilderTest.java')
-rw-r--r-- | openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/test/java/org/openecomp/sdc/versioning/errors/CheckoutOnLockedEntityErrorBuilderTest.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/test/java/org/openecomp/sdc/versioning/errors/CheckoutOnLockedEntityErrorBuilderTest.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/test/java/org/openecomp/sdc/versioning/errors/CheckoutOnLockedEntityErrorBuilderTest.java new file mode 100644 index 0000000000..2a8cabbca8 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/test/java/org/openecomp/sdc/versioning/errors/CheckoutOnLockedEntityErrorBuilderTest.java @@ -0,0 +1,22 @@ +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 CheckoutOnLockedEntityErrorBuilderTest { + @Test + public void test() { + CheckoutOnLockedEntityErrorBuilder builder = new CheckoutOnLockedEntityErrorBuilder("entityType", + "entityId", "lockingUser"); + + ErrorCode build = builder.build(); + Assert.assertEquals(VersioningErrorCodes.CHECKOT_ON_LOCKED_ENTITY, build.id() ); + Assert.assertEquals(ErrorCategory.APPLICATION, build.category() ); + Assert.assertEquals(String.format(CheckoutOnLockedEntityErrorBuilder.CHECKOT_ON_LOCKED_ENTITY_MSG, + "entityType", "entityId", "lockingUser") , build.message()); + } + +}
\ No newline at end of file |