diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/common/ApplicationProperties.java b/src/policy/src/main/java/org/etsi/tfs/policy/common/ApplicationProperties.java index b24ecd4a56de7663e55e865484c8c4aff634cbf8..f01fcd9cca39350bf103fd1e2fe894334c4a3b80 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/common/ApplicationProperties.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/common/ApplicationProperties.java @@ -1,3 +1,19 @@ +/* +* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* +* 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 +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + package org.etsi.tfs.policy.common; import org.etsi.tfs.policy.model.PolicyRuleState; diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyAddDeviceTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyAddDeviceTest.java index 1b00248e1b142750e8b247b5d9965939fba0e340..68daec087707d31e122a911cba24d7f609d40d08 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyAddDeviceTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyAddDeviceTest.java @@ -86,7 +86,7 @@ class PolicyAddDeviceTest { new PolicyRuleState(PolicyRuleStateEnum.POLICY_FAILED, "Device Ids must not be empty."); policyService - .updatePolicyDevice(policyRuleDevice) + .addPolicyDevice(policyRuleDevice) .subscribe() .with( item -> { @@ -118,7 +118,7 @@ class PolicyAddDeviceTest { PolicyRuleStateEnum.POLICY_FAILED, "Policy Rule conditions cannot be empty."); policyService - .updatePolicyDevice(policyRuleDevice) + .addPolicyDevice(policyRuleDevice) .subscribe() .with( item -> { @@ -130,8 +130,7 @@ class PolicyAddDeviceTest { } @Test - void isUpdatedPolicyRuleIdValid() - throws ExecutionException, InterruptedException, TimeoutException { + void isPolicyRuleIdValid() throws ExecutionException, InterruptedException, TimeoutException { CompletableFuture<PolicyRuleState> message = new CompletableFuture<>(); PolicyRuleDevice policyRuleDevice = @@ -147,7 +146,7 @@ class PolicyAddDeviceTest { .thenReturn(Uni.createFrom().item(Boolean.FALSE)); policyService - .updatePolicyDevice(policyRuleDevice) + .addPolicyDevice(policyRuleDevice) .subscribe() .with( item -> { @@ -159,8 +158,7 @@ class PolicyAddDeviceTest { } @Test - void successUpdatePolicyService() - throws ExecutionException, InterruptedException, TimeoutException { + void successPolicyDevice() throws ExecutionException, InterruptedException, TimeoutException { CompletableFuture<PolicyRuleState> message = new CompletableFuture<>(); PolicyRuleDevice policyRuleDevice =