2 * Copyright (c) 2014, 2016 Cisco Systems, Inc. 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 test.mock.util;
10 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.AddFlowInput;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.AddFlowOutput;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.RemoveFlowInput;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.RemoveFlowOutput;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.UpdateFlowInput;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.UpdateFlowOutput;
17 import org.opendaylight.yangtools.yang.common.RpcResult;
19 import java.util.ArrayList;
20 import java.util.List;
21 import java.util.concurrent.Future;
23 public class SalFlowServiceMock implements SalFlowService{
24 private List<AddFlowInput> addFlowCalls = new ArrayList<>();
25 private List<RemoveFlowInput> removeFlowCalls = new ArrayList<>();
26 private List<UpdateFlowInput> updateFlowCalls = new ArrayList<>();
29 public Future<RpcResult<AddFlowOutput>> addFlow(AddFlowInput input) {
30 addFlowCalls.add(input);
36 public Future<RpcResult<RemoveFlowOutput>> removeFlow(RemoveFlowInput input) {
37 removeFlowCalls.add(input);
42 public Future<RpcResult<UpdateFlowOutput>> updateFlow(UpdateFlowInput input) {
43 updateFlowCalls.add(input);
47 public List<AddFlowInput> getAddFlowCalls() {
51 public List<RemoveFlowInput> getRemoveFlowCalls() {
52 return removeFlowCalls;
55 public List<UpdateFlowInput> getUpdateFlowCalls() {
56 return updateFlowCalls;