2 * Copyright (c) 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 org.opendaylight.mdsal.common.api;
10 import static org.junit.Assert.assertEquals;
11 import static org.opendaylight.mdsal.common.api.PostPreCommitStep.NOOP_COMMIT_FUTURE;
13 import org.junit.Test;
15 public class PostCommitStepTest {
18 public void preCommitTest() throws Exception {
19 final PostCanCommitStep postCanCommitStep = PostCanCommitStep.NOOP;
21 assertEquals(ThreePhaseCommitStep.NOOP_ABORT_FUTURE ,postCanCommitStep.abort());
22 assertEquals(PostPreCommitStep.NOOP_FUTURE, postCanCommitStep.preCommit());
26 public void canCommitTest() throws Exception {
27 final PostPreCommitStep postPreCommitStep = PostPreCommitStep.NOOP;
29 assertEquals(ThreePhaseCommitStep.NOOP_ABORT_FUTURE ,postPreCommitStep.abort());
30 assertEquals(NOOP_COMMIT_FUTURE, postPreCommitStep.commit());