Commit 92e777f4 authored by Konstantinos Poulakakis's avatar Konstantinos Poulakakis
Browse files

test: make some minor fixes.

parent 7a31182d
Loading
Loading
Loading
Loading
+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;
+5 −7
Original line number Diff line number Diff line
@@ -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 =