Skip to content
Snippets Groups Projects
Commit 92e777f4 authored by Konstantinos Poulakakis's avatar Konstantinos Poulakakis
Browse files

test: make some minor fixes.

parent 7a31182d
No related branches found
No related tags found
2 merge requests!235Release TeraFlowSDN 3.0,!201Resolve "(UBI) Unit Tests for Policy component"
/*
* 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;
......
......@@ -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 =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment