Add missing license headers
[openflowplugin.git] / applications / forwardingrules-manager / src / test / java / test / mock / util / SalFlowServiceMock.java
1 /*
2  * Copyright (c) 2014, 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package test.mock.util;
9
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;
18
19 import java.util.ArrayList;
20 import java.util.List;
21 import java.util.concurrent.Future;
22
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<>();
27
28     @Override
29     public Future<RpcResult<AddFlowOutput>> addFlow(AddFlowInput input) {
30         addFlowCalls.add(input);
31         return null;
32     }
33
34
35     @Override
36     public Future<RpcResult<RemoveFlowOutput>> removeFlow(RemoveFlowInput input) {
37         removeFlowCalls.add(input);
38         return null;
39     }
40
41     @Override
42     public Future<RpcResult<UpdateFlowOutput>> updateFlow(UpdateFlowInput input) {
43         updateFlowCalls.add(input);
44         return null;
45     }
46
47     public List<AddFlowInput> getAddFlowCalls() {
48         return addFlowCalls;
49     }
50
51     public List<RemoveFlowInput> getRemoveFlowCalls() {
52         return removeFlowCalls;
53     }
54
55     public List<UpdateFlowInput> getUpdateFlowCalls() {
56         return updateFlowCalls;
57     }
58 }