2 * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. 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.netvirt.cloudservicechain.matchers;
10 import org.mockito.ArgumentMatcher;
11 import org.opendaylight.genius.mdsalutil.FlowEntity;
12 import org.opendaylight.genius.mdsalutil.InstructionInfo;
13 import org.opendaylight.genius.mdsalutil.MatchInfo;
15 public class FlowEntityMatcher extends ArgumentMatcher<FlowEntity> {
17 FlowEntity expectedFlow;
19 public FlowEntityMatcher(FlowEntity expectedFlow) {
20 this.expectedFlow = expectedFlow;
23 public boolean sameMatch(MatchInfo match1, MatchInfo match2) {
24 // TODO: implement this
28 public boolean sameInstructions(InstructionInfo instructions1, InstructionInfo instructions2) {
29 // TODO: implement this
34 public boolean matches(Object actualFlow) {
35 if (! (actualFlow instanceof FlowEntity)) {
38 boolean result = true;
39 FlowEntity flow = (FlowEntity) actualFlow;
40 // flow.getId() != null && flow.getId().equals(expectedFlow.getId())
41 // && flow.getTableId() == expectedFlow.getTableId()
42 // && StringUtils.equals(flow.getFlowName(), expectedFlow.getFlowName())
43 // && sameInstructions(flow.getInstructions(), expectedFlow.getInstructions())
44 // && sameMatch(flow.getMatch(), expectedFlow.getMatch());