示例#1
0
        public void IsMajorConflict_returns_true_for_version_numbers_with_1st_and_2nd_number_different()
        {
            var dependency = new Dependency();
            dependency.ActualReference = GetNewAssemblyNameWithVersion(3, 4, 3, 8);
            dependency.Reference = GetNewAssemblyNameWithVersion(1, 2, 3, 8);

            Assert.That(dependency.IsMajorConflict, Is.True, "should report a conflict if the version number 1st and 2nd numbers are different");
        }
示例#2
0
        public void IsMajorConflict_returns_false_for_version_numbers_with_only_4th_number_different()
        {
            var dependency = new Dependency();
            dependency.ActualReference = GetNewAssemblyNameWithVersion(1, 2, 3, 4);
            dependency.Reference = GetNewAssemblyNameWithVersion(1, 2, 3, 8);

            Assert.That(dependency.IsMajorConflict, Is.False, "should not report a conflict if the version numbers are same except for 4th number");
        }
示例#3
0
        public void IsConflict_returns_true_for_conflict_of_nonbreaking_change_number()
        {
            var dependency = new Dependency();
            dependency.ActualReference = GetNewAssemblyNameWithVersion(1, 2, 5, 4);
            dependency.Reference = GetNewAssemblyNameWithVersion(1, 2, 3, 4);

            Assert.That(dependency.IsConflict, Is.True, "should report a minor conflict if the version numbers are not the same");
        }
示例#4
0
        public void IsMajorConflict_returns_false_for_identical_version_numbers()
        {
            var dependency = new Dependency();
            dependency.ActualReference = GetNewAssemblyNameWithVersion(1, 2, 3, 4);
            dependency.Reference = GetNewAssemblyNameWithVersion(1, 2, 3, 4);

            Assert.That(dependency.IsMajorConflict, Is.False, "should not report a conflict if the version numbers are identical");
        }
示例#5
0
        public void Setup()
        {
            _aReferencesOutOfDateB = Dependency.New().
                For("Assembly_A", "1.0").
                ThatReferences("Assembly_B", "1.0").
                WithActualReferenceVersion("1.1").Build();

            _cReferencesOutOfDateB = Dependency.New().
                For("Assembly_C", "1.0").
                ThatReferences("Assembly_B", "1.0").
                WithActualReferenceVersion("1.1").Build();

            _aReferencesUpToDateB = Dependency.New().
                For("Assembly_A", "2.0").
                ThatReferences("Assembly_B", "2.0").
                WithActualReferenceVersion("2.0").Build();

            _dependencies = new List<Dependency> {
                _aReferencesOutOfDateB, _cReferencesOutOfDateB, _aReferencesUpToDateB
            };

            _conflicts = new DependencyReport(_dependencies).Conflicts;
        }