Loading src/policy/src/main/java/org/etsi/tfs/policy/common/ApplicationProperties.java +16 −0 Original line number Diff line number Diff line /* * 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; Loading src/policy/src/test/java/org/etsi/tfs/policy/PolicyAddDeviceTest.java +5 −7 Original line number Diff line number Diff line Loading @@ -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 -> { Loading Loading @@ -118,7 +118,7 @@ class PolicyAddDeviceTest { PolicyRuleStateEnum.POLICY_FAILED, "Policy Rule conditions cannot be empty."); policyService .updatePolicyDevice(policyRuleDevice) .addPolicyDevice(policyRuleDevice) .subscribe() .with( item -> { Loading @@ -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 = Loading @@ -147,7 +146,7 @@ class PolicyAddDeviceTest { .thenReturn(Uni.createFrom().item(Boolean.FALSE)); policyService .updatePolicyDevice(policyRuleDevice) .addPolicyDevice(policyRuleDevice) .subscribe() .with( item -> { Loading @@ -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 = Loading Loading
src/policy/src/main/java/org/etsi/tfs/policy/common/ApplicationProperties.java +16 −0 Original line number Diff line number Diff line /* * 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; Loading
src/policy/src/test/java/org/etsi/tfs/policy/PolicyAddDeviceTest.java +5 −7 Original line number Diff line number Diff line Loading @@ -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 -> { Loading Loading @@ -118,7 +118,7 @@ class PolicyAddDeviceTest { PolicyRuleStateEnum.POLICY_FAILED, "Policy Rule conditions cannot be empty."); policyService .updatePolicyDevice(policyRuleDevice) .addPolicyDevice(policyRuleDevice) .subscribe() .with( item -> { Loading @@ -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 = Loading @@ -147,7 +146,7 @@ class PolicyAddDeviceTest { .thenReturn(Uni.createFrom().item(Boolean.FALSE)); policyService .updatePolicyDevice(policyRuleDevice) .addPolicyDevice(policyRuleDevice) .subscribe() .with( item -> { Loading @@ -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 = Loading