2 * Copyright (c) 2016 Huawei Technologies and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.groupbasedpolicy.renderer.faas;
10 import static org.junit.Assert.assertTrue;
12 import java.util.concurrent.Executor;
13 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.endpoints.Endpoint;
16 public class MockFaasEndpointManagerListener extends FaasEndpointManagerListener {
18 private Endpoint expectedEndpoint;
20 public MockFaasEndpointManagerListener(FaasPolicyManager policyManager, DataBroker dataProvider,
22 super(policyManager, dataProvider, executor);
25 // *******************************************************
27 // *******************************************************
29 protected void processEndpoint(Endpoint endpoint) {
30 if (expectedEndpoint != null) {
31 assertTrue("FaasEndpointManagerListener.processEndpoint", expectedEndpoint.equals(endpoint));
35 // *******************************************************
36 // The following Methods are to input test data
37 // *******************************************************
38 public void setExpectedEndpoint(Endpoint testEndpoint) {
39 this.expectedEndpoint = testEndpoint;