+/*
+ * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
package org.opendaylight.yangtools.yang.parser.repo;
import static org.junit.Assert.assertNotNull;
+import org.opendaylight.yangtools.yang.model.repo.api.RevisionSourceIdentifier;
+
import com.google.common.collect.Lists;
import com.google.common.util.concurrent.CheckedFuture;
import com.google.common.util.concurrent.Futures;
final ResourceYangSource source1 = new ResourceYangSource("/ietf/ietf-inet-types@2010-09-24.yang");
final ResourceYangSource source2 = new ResourceYangSource("/ietf/iana-timezones@2012-07-09.yang");
- s1 = new SourceIdentifier("ietf-inet-types", "2010-09-24");
- s2 = new SourceIdentifier("iana-timezones", "2012-07-09");
+ s1 = RevisionSourceIdentifier.create("ietf-inet-types", "2010-09-24");
+ s2 = RevisionSourceIdentifier.create("iana-timezones", "2012-07-09");
final TextToASTTransformer transformer = TextToASTTransformer.create(repository, repository);
repository.registerSchemaSourceListener(transformer);
provider.register(repository);
// Register the same provider under source id without revision
- final SourceIdentifier sIdWithoutRevision = new SourceIdentifier(provider.getId().getName());
+ final SourceIdentifier sIdWithoutRevision = RevisionSourceIdentifier.create(provider.getId().getName());
repository.registerSchemaSource(provider, PotentialSchemaSource.create(
sIdWithoutRevision, ASTSchemaSource.class, PotentialSchemaSource.Costs.IMMEDIATE.getValue()));