Esempio n. 1
0
        public void HashDifferentForComplexJob()
        {
            AtlasJob j  = MakeSimpleJob();
            var      h1 = j.Hash();

            j.Packages[0].SCTag = "tag1";
            var h2 = j.Hash();

            Assert.AreNotEqual(h1, h2);
        }
Esempio n. 2
0
        public void HashIsDifferent()
        {
            var j = new AtlasJob()
            {
                Name = "Hi there", Version = 12
            };
            var h1 = j.Hash();

            j.Name = "not there";
            var h2 = j.Hash();

            Assert.AreNotEqual(h1, h2);
        }
Esempio n. 3
0
        public void StableHash()
        {
            var j = new AtlasJob()
            {
                Name = "DiVertAnalysis", Version = 22
            };
            var h = j.Hash();

            Assert.AreEqual("3B233454", h);
        }
Esempio n. 4
0
        public void HashNotSame()
        {
            var j1 = new AtlasJob()
            {
                Name = "DiVertAnalysiss", Version = 22
            };
            var j2 = new AtlasJob()
            {
                Name = "DiVertAnalysis", Version = 22
            };

            Assert.AreNotEqual(j1.Hash(), j2.Hash());
        }
Esempio n. 5
0
        public void HashSameForReorderedPackages()
        {
            var j1 = new AtlasJob()
            {
                Name     = "DiVertAnalysis", Version = 22,
                Packages = new Package[]
                {
                    new Package()
                    {
                        Name = "pkg1", SCTag = "v00-00-00"
                    },
                    new Package()
                    {
                        Name = "pkg2", SCTag = "v00-01-00"
                    }
                },
            };
            var j2 = new AtlasJob()
            {
                Name     = "DiVertAnalysis",
                Version  = 22,
                Packages = new Package[]
                {
                    new Package()
                    {
                        Name = "pkg2", SCTag = "v00-01-00"
                    },
                    new Package()
                    {
                        Name = "pkg1", SCTag = "v00-00-00"
                    },
                },
            };

            Assert.AreEqual(j1.Hash(), j2.Hash());
        }