예제 #1
0
        public void NotBeforeAndAfterVersion()
        {
            var nuget = new NuGetPackages()
            {
                new NuGetPackage()
                {
                    Id = "Test", Version = "1.0.1"
                }, new NuGetPackage()
                {
                    Id = "Test2", Version = "0.0.9"
                }
            };
            var unsafePacks = new UnsafePackages()
            {
                new UnsafePackage()
                {
                    Id = "Test", Before = "1.0.1", After = "0.0.9"
                }, new UnsafePackage()
                {
                    Id = "Test2", Before = "1.0.1", After = "0.0.9"
                }
            };
            var result = new DecisionMaker().Evaluate(nuget, unsafePacks);

            Assert.AreEqual(0, result.Count());
        }
예제 #2
0
        public void AfterOrAtVersion()
        {
            var nuget = new NuGetPackages()
            {
                new NuGetPackage()
                {
                    Id = "Test", Version = "1.0.0"
                }, new NuGetPackage()
                {
                    Id = "Test2", Version = "1.0.0"
                }
            };
            var unsafePacks = new UnsafePackages()
            {
                new UnsafePackage()
                {
                    Id = "Test", AfterOrAt = "1.0.0"
                }, new UnsafePackage()
                {
                    Id = "Test2", AfterOrAt = "0.0.9"
                }
            };
            var result = new DecisionMaker().Evaluate(nuget, unsafePacks);

            Assert.AreEqual(2, result.Count());
        }
예제 #3
0
        public void BeforeVersion()
        {
            var nuget = new NuGetPackages()
            {
                new NuGetPackage()
                {
                    Id = "Test", Version = "1.0.0-alpha1"
                }
            };
            var unsafePacks = new UnsafePackages()
            {
                new UnsafePackage()
                {
                    Id = "Test", Before = "1.0.1"
                }
            };
            var result = new DecisionMaker().Evaluate(nuget, unsafePacks);

            Assert.AreEqual(1, result.Count());
        }