import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
+
import com.google.common.collect.Sets;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Set;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.opendaylight.yangtools.concepts.SemVer;
import org.opendaylight.yangtools.yang.common.QNameModule;
import org.opendaylight.yangtools.yang.common.SimpleDateFormatUtil;
import org.opendaylight.yangtools.yang.model.api.Module;
* CFG(R)
* | \
* | \
- * M2 <- M3
+ * M2 <- M3
* </pre>
*/
@Test
* No root or additional modules
* | \
* | \
- * M2 <- M3
+ * M2 <- M3
* </pre>
*/
@Test
* Config
* | \ (NR)
* | \
- * M2 <- M3
+ * M2 <- M3
* </pre>
*/
@Test
* CFG(R)
* | \
* | \
- * M2<-(NullRev)M3
+ * M2<-(NullRev)M3
* </pre>
*/
@Test
* CFG(R)
* |
* |
- * M2 <- M3
+ * M2 <- M3
* </pre>
*/
@Test
* CFG(R)
* |
* |
- * M2 -> M3 -> M4 -> M5
+ * M2 -> M3 -> M4 -> M5
* </pre>
*/
@Test
* CFG(R)
* |
* |
- * M2 -> M3 <- M4
+ * M2 -> M3 <- M4
* </pre>
*/
@Test
* CFG(R)
* | \
* | \
- * M2 <- M3 M4=M3(Different revision)
+ * M2 <- M3 M4=M3(Different revision)
* </pre>
*/
@Test
* <pre>
* CFG(R)
* |
- * M2 -(no revision)-> M3(R2) ... M3(R1)
+ * M2 -(no revision)-> M3(R2) ... M3(R1)
* </pre>
*/
@Test
* CFG(R)
* | \
* | \
- * | M2 -> M3
+ * | M2 -> M3
* |
- * M41(S) => M4
+ * M41(S) => M4
* </pre>
*/
@Test
/**
* <pre>
*
- * M2 -> M3 -> M4 -> M5
+ * M2 -> M3 -> M4 -> M5
*
* </pre>
*/
* | M5
* M2
*
- * M3 -> M4
+ * M3 -> M4
*
* </pre>
*/
Set<Module> modSet = Sets.newHashSet();
- if(expected!=null) {
+ if (expected!=null) {
modSet = Sets.newHashSet(expected);
}
assertEquals(modSet, modSetFiltering);
//asserting collections
- if(expected!=null) {
+ if (expected!=null) {
for (final Module module : expected) {
assertEquals(module, filteringSchemaContextProxy.findModuleByName(module.getName(), module.getRevision()));
Set<Module> modulesSet = new HashSet<>();
- if(modules!=null) {
+ if (modules!=null) {
modulesSet = Sets.newHashSet(modules);
Set<ModuleId> moduleIds = Sets.newHashSet();
- if(modules!=null && modules.size()>0) {
+ if (modules!=null && modules.size()>0) {
for (Module module : modules) {
return module.getName();
}
+ @Override
+ public SemVer getSemanticVersion() {
+ return module.getSemanticVersion();
+ }
+
@Override
public String toString() {