diff options
author | Sébastien Determe <sebastien.determe@intl.att.com> | 2019-05-08 11:10:15 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-05-08 11:10:15 +0000 |
commit | b0f7e5bf406a393abc6cfb9fc6cf1003b6e6ef10 (patch) | |
tree | fca9638d6dc67a773e21d3da91f641784f72c6a3 /src/test/java/org/onap | |
parent | 224df08e29cae9829d805c7b686727eea660d1b1 (diff) | |
parent | 5376d372e0ba5a610eca9a6729cc5b4180fc9122 (diff) |
Merge "Improve test coverage in UserJsonDecoder"
Diffstat (limited to 'src/test/java/org/onap')
-rw-r--r-- | src/test/java/org/onap/clamp/clds/config/CldsUserJsonDecoderTest.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/test/java/org/onap/clamp/clds/config/CldsUserJsonDecoderTest.java b/src/test/java/org/onap/clamp/clds/config/CldsUserJsonDecoderTest.java index a32a60351..549c91321 100644 --- a/src/test/java/org/onap/clamp/clds/config/CldsUserJsonDecoderTest.java +++ b/src/test/java/org/onap/clamp/clds/config/CldsUserJsonDecoderTest.java @@ -5,6 +5,8 @@ * Copyright (C) 2017 AT&T Intellectual Property. All rights * reserved. * ================================================================================ + * Modifications Copyright (c) 2019 Samsung + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -25,10 +27,11 @@ package org.onap.clamp.clds.config; import static org.assertj.core.api.Assertions.assertThat; - import org.junit.Test; +import org.onap.clamp.clds.exception.CldsUsersException; import org.onap.clamp.clds.service.CldsUser; + public class CldsUserJsonDecoderTest { private String user1 = "admin1"; @@ -92,4 +95,12 @@ public class CldsUserJsonDecoderTest { assertThat(user.getPassword()).isEqualTo(password); assertThat(user.getPermissionsString()).isEqualTo(incompletePermissionsArray); } + + @Test(expected = CldsUsersException.class) + public void shouldThrowCldsUsersException() { + //when + CldsUserJsonDecoder + .decodeJson(this.getClass().getResourceAsStream("/clds/clds-parse-exception.json")); + } + } |