public void TestNormalizeBefore() { var restriction = new Restriction { Constraints = { new Constraint { Before = new ImplementationVersion("2.0") } } }; restriction.Normalize(); Assert.AreEqual(new VersionRange("..!2.0"), restriction.Versions); }
public void TestNormalizeBefore() { var restriction = new Restriction { InterfaceUri = FeedTest.Test1Uri, Constraints = { new Constraint { Before = new ImplementationVersion("2.0") } } }; restriction.Normalize(); restriction.Versions.Should().Be(new VersionRange("..!2.0")); }
public void TestNormalizeOverlap() { var restriction = new Restriction { Constraints = { new Constraint { NotBefore = new ImplementationVersion("1.0"), Before = new ImplementationVersion("2.0") }, new Constraint { NotBefore = new ImplementationVersion("0.9"), Before = new ImplementationVersion("1.9") }, } }; restriction.Normalize(); Assert.AreEqual(new VersionRange("1.0..!1.9"), restriction.Versions); }
public void TestNormalizeOverlap() { var restriction = new Restriction { InterfaceUri = FeedTest.Test1Uri, Constraints = { new Constraint { NotBefore = new ImplementationVersion("1.0"), Before = new ImplementationVersion("2.0") }, new Constraint { NotBefore = new ImplementationVersion("0.9"), Before = new ImplementationVersion("1.9") }, } }; restriction.Normalize(); restriction.Versions.Should().Be(new VersionRange("1.0..!1.9")); }