Adjust to yangtools-2.0.0 changes
[mdsal.git] / binding / mdsal-binding-dom-adapter / src / test / java / org / opendaylight / mdsal / binding / dom / adapter / FutureSchemaTest.java
1 /*
2  * Copyright (c) 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 org.opendaylight.mdsal.binding.dom.adapter;
9
10 import static org.junit.Assert.assertEquals;
11 import static org.junit.Assert.assertFalse;
12 import static org.junit.Assert.assertNotNull;
13
14 import com.google.common.collect.ImmutableSet;
15 import java.net.URI;
16 import java.util.concurrent.TimeUnit;
17 import org.junit.Test;
18 import org.opendaylight.yangtools.yang.common.QNameModule;
19
20 public class FutureSchemaTest {
21
22     @Test
23     public void basicTest() throws Exception {
24         final FutureSchema futureSchema = FutureSchema.create(0, TimeUnit.MICROSECONDS, true);
25         assertNotNull(futureSchema);
26         assertFalse(futureSchema.waitForSchema(QNameModule.create(new URI("test"))));
27         assertFalse(futureSchema.waitForSchema(ImmutableSet.of()));
28         assertEquals(0, futureSchema.getDuration());
29         assertEquals(TimeUnit.MICROSECONDS, futureSchema.getUnit());
30     }
31 }