2 * Copyright (c) 2017 Pantheon Technologies s.r.o. 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.controller.cluster.access.commands;
10 import com.google.common.base.MoreObjects;
11 import org.junit.Assert;
12 import org.junit.Test;
13 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
15 public abstract class AbstractReadTransactionRequestTest<T extends AbstractReadTransactionRequest>
16 extends AbstractTransactionRequestTest {
17 protected static final YangInstanceIdentifier PATH = YangInstanceIdentifier.EMPTY;
18 protected static final boolean SNAPSHOT_ONLY = true;
21 protected abstract T object();
24 public void getPathTest() {
25 Assert.assertEquals(PATH, object().getPath());
29 public void isSnapshotOnlyTest() {
30 Assert.assertEquals(SNAPSHOT_ONLY, object().isSnapshotOnly());
34 public void addToStringAttributesTest() {
35 final MoreObjects.ToStringHelper result = object().addToStringAttributes(MoreObjects.toStringHelper(object()));
36 Assert.assertTrue(result.toString().contains("path=" + PATH));