diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2020-03-10 12:41:47 -0400 |
---|---|---|
committer | Pamela Dragosh <pdragosh@research.att.com> | 2020-03-10 12:47:00 -0400 |
commit | ef1c07eb976ff4d8145f40ce4db092591bb78047 (patch) | |
tree | 7942bdc30e70091eb17b639c7bdc284ae5daf49c /applications/common/src/test/java | |
parent | b0a27abb7d8812d5a73f65645df0bdbf06e4d64d (diff) |
Bump monitoring app code coverage
Cleaned up some code to remove unnecessary branches. Add more
test cases specifically for query parameters.
Coverage should be above 90% for this repo.
Issue-ID: POLICY-2242
Change-Id: I20a75aacd75f9b8c87abb47e88b81ab8f2d30626
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'applications/common/src/test/java')
-rw-r--r-- | applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdCombinedPolicyResultsTranslatorTest.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdCombinedPolicyResultsTranslatorTest.java b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdCombinedPolicyResultsTranslatorTest.java index 93124552..6ff7a7f1 100644 --- a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdCombinedPolicyResultsTranslatorTest.java +++ b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdCombinedPolicyResultsTranslatorTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -123,6 +123,10 @@ public class StdCombinedPolicyResultsTranslatorTest { public void testConvert() throws ToscaPolicyConversionException, CoderException { StdCombinedPolicyResultsTranslator translator = new StdCombinedPolicyResultsTranslator(); + assertThatThrownBy(() -> translator.convertPolicy(null)).isInstanceOf(ToscaPolicyConversionException.class) + .hasMessageContaining("Cannot convert a NULL policy"); + + assertThatThrownBy(() -> translator.convertPolicy( new ToscaPolicy())).isInstanceOf(ToscaPolicyConversionException.class) .hasMessageContaining("missing metadata"); |