Convert DCL tests to use DTCL
[controller.git] / opendaylight / md-sal / sal-inmemory-datastore / src / test / java / org / opendaylight / controller / md / sal / dom / store / impl / RootScopeSubtreeTest.java
1 /*
2  * Copyright (c) 2014 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 org.opendaylight.controller.md.sal.dom.store.impl;
9
10 import static org.opendaylight.controller.md.sal.dom.store.impl.DatastoreTestTask.added;
11 import static org.opendaylight.controller.md.sal.dom.store.impl.DatastoreTestTask.deleted;
12 import static org.opendaylight.controller.md.sal.dom.store.impl.DatastoreTestTask.replaced;
13 import static org.opendaylight.controller.md.sal.dom.store.impl.DatastoreTestTask.subtreeModified;
14
15 public class RootScopeSubtreeTest extends DefaultDataTreeChangeListenerTestSuite {
16
17     @Override
18     protected void putTopLevelOneNestedSetup(final DatastoreTestTask task) {
19         task.changeListener(TOP_LEVEL, added(TOP_LEVEL));
20     }
21
22     @Override
23     protected void putTopLevelOneNestedVerify(final DatastoreTestTask task) {
24         task.verifyChangeEvents();
25     }
26
27     @Override
28     protected void replaceTopLevelNestedSetup(DatastoreTestTask task) {
29         task.changeListener(TOP_LEVEL, added(TOP_LEVEL), replaced(TOP_LEVEL));
30     }
31
32     @Override
33     protected void replaceTopLevelNestedVerify(final DatastoreTestTask task) {
34         task.verifyChangeEvents();
35     }
36
37     @Override
38     protected void putTopLevelWithTwoNestedSetup(final DatastoreTestTask task) {
39         task.changeListener(TOP_LEVEL, added(TOP_LEVEL));
40     }
41
42     @Override
43     protected void putTopLevelWithTwoNestedVerify(final DatastoreTestTask task) {
44         task.verifyChangeEvents();
45     }
46
47     @Override
48     protected void twoNestedExistsOneIsDeletedSetup(DatastoreTestTask task) {
49         task.changeListener(TOP_LEVEL, added(TOP_LEVEL), subtreeModified(TOP_LEVEL));
50     }
51
52     @Override
53     protected void twoNestedExistsOneIsDeletedVerify(final DatastoreTestTask task) {
54         task.verifyChangeEvents();
55     }
56
57     @Override
58     protected void nestedListExistsRootDeletedSetup(DatastoreTestTask task) {
59         task.changeListener(TOP_LEVEL, added(TOP_LEVEL), deleted(TOP_LEVEL));
60     }
61
62     @Override
63     protected void nestedListExistsRootDeletedVerify(final DatastoreTestTask task) {
64         task.verifyChangeEvents();
65     }
66
67     @Override
68     protected void existingOneNestedWriteAdditionalNestedSetup(DatastoreTestTask task) {
69         task.changeListener(TOP_LEVEL, added(TOP_LEVEL), subtreeModified(TOP_LEVEL));
70     }
71
72     @Override
73     protected void existingOneNestedWriteAdditionalNestedVerify(final DatastoreTestTask task) {
74         task.verifyChangeEvents();
75     }
76
77     @Override
78     protected void existingTopWriteTwoNestedSetup(DatastoreTestTask task) {
79         task.changeListener(TOP_LEVEL, added(TOP_LEVEL), subtreeModified(TOP_LEVEL));
80     }
81
82     @Override
83     protected void existingTopWriteTwoNestedVerify(final DatastoreTestTask task) {
84         task.verifyChangeEvents();
85     }
86
87     @Override
88     protected void existingTopWriteSiblingSetup(DatastoreTestTask task) {
89         task.changeListener(TOP_LEVEL, added(TOP_LEVEL), subtreeModified(TOP_LEVEL));
90     }
91
92     @Override
93     protected void existingTopWriteSiblingVerify(final DatastoreTestTask task) {
94         task.verifyChangeEvents();
95     }
96 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.