From 92e777f41b9ee116dc309d4e78149053e572b0b3 Mon Sep 17 00:00:00 2001 From: kpoulakakis <kpoulakakis@ubitech.eu> Date: Thu, 8 Feb 2024 16:42:45 +0200 Subject: [PATCH] test: make some minor fixes. --- .../tfs/policy/common/ApplicationProperties.java | 16 ++++++++++++++++ .../org/etsi/tfs/policy/PolicyAddDeviceTest.java | 12 +++++------- 2 files changed, 21 insertions(+), 7 deletions(-) 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 b24ecd4a5..f01fcd9cc 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 1b00248e1..68daec087 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 = -- GitLab