public static void NoSpecifiedDefaultTargets()
        {
            var parser  = new TargetNameParser(new TestCatalog(), String.Empty);
            var targets = parser.MapTargetsToExplicitVersions(Enumerable.Empty <string>());

            // We should only have 0 target!
            Assert.Empty(targets);
        }
        public static void UnReleasedTarget()
        {
            var parser  = new TargetNameParser(new TestCatalog(), "Target 1, version=1.0");
            var targets = parser.MapTargetsToExplicitVersions(new string[] { "Target 3" });

            // We should only have 1 target!
            Assert.Single(targets);
            Assert.Equal(TestCatalog.Target3.FullName, targets.First().ToString());
        }
        public static void CaseInsensitive()
        {
            var parser  = new TargetNameParser(new TestCatalog(), String.Empty);
            var targets = parser.MapTargetsToExplicitVersions(new String[] { "target 1, version=1.0" });

            // We should only have 1 target!
            Assert.Single(targets);
            Assert.Equal("target 1,Version=v1.0", targets.First().ToString());
        }
        public static void NoSpecifiedTargets_2()
        {
            var parser  = new TargetNameParser(new TestCatalog(), "Target 1, version=1.0");
            var targets = parser.MapTargetsToExplicitVersions(Enumerable.Empty <string>());

            // We should only have 1 target!
            Assert.Single(targets);
            Assert.Equal(TestCatalog.Target1.FullName, targets.First().ToString());
        }
Esempio n. 5
0
        public void UnReleasedTarget()
        {
            var parser  = new TargetNameParser(new TestCatalog(), "Target 1, version=1.0");
            var targets = parser.MapTargetsToExplicitVersions(new string[] { "Target 3" });

            // We should only have 1 target!
            Assert.Equal(1, targets.Count());
            Assert.Equal("Target 3,Version=v2.0", targets.First().ToString());
        }
        public static void NoSpecifiedTargets()
        {
            var parser  = new TargetNameParser(new TestCatalog(), "Target 1, version=1.0");
            var targets = parser.MapTargetsToExplicitVersions(null);

            // Tests if we actually filter out the public targets based on the default target list in the config
            // We should only have 1 target!
            Assert.Single(targets);
            Assert.Equal(TestCatalog.Target1.FullName, targets.First().ToString());
        }
        public static void NonExistentSpecifiedVersionOnKnownTargetWithAvailableTarget()
        {
            var parser = new TargetNameParser(new TestCatalog(), "Target 1, version=1.0");

            Assert.Throws <UnknownTargetException>(() => parser.MapTargetsToExplicitVersions(new string[] { "Target 1, version=2.0", "Target 1, version=1.0" }));
        }
        public void NonExistentSpecifiedTarget()
        {
            var parser = new TargetNameParser(new TestCatalog(), "Target 1, version=1.0");

            Assert.Throws <UnknownTargetException>(() => parser.MapTargetsToExplicitVersions(new string[] { "Foo" }));
        }