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.ScheduledExecutorService;
14 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.endpoints.Endpoint;
17 public class MockFaasEndpointManagerListener extends FaasEndpointManagerListener {
19 private Endpoint expectedEndpoint;
21 public MockFaasEndpointManagerListener(FaasPolicyManager policyManager, DataBroker dataProvider,
22 ScheduledExecutorService executor) {
23 super(policyManager, dataProvider, executor);
26 // *******************************************************
28 // *******************************************************
30 protected void processEndpoint(Endpoint endpoint) {
31 if (expectedEndpoint != null)
32 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;