Esempio n. 1
0
        public void ReturnZeroForZeroIdentifiers()
        {
            var entity = new SourceSystem();

            var candidate = entity.ToMdmKey();

            Assert.AreEqual(0, candidate);
        }
Esempio n. 2
0
        public void ReturnZeroForNullMdmEntity()
        {
            SourceSystem entity = null;

            var candidate = entity.ToMdmKey();

            Assert.AreEqual(0, candidate);
        }
Esempio n. 3
0
        public void ReturnZeroForNoNexusIdentifier()
        {
            var entity = new SourceSystem();

            entity.Identifiers.Add(new MdmId());

            var candidate = entity.ToMdmKey();

            Assert.AreEqual(0, candidate);
        }
Esempio n. 4
0
        public void ReturnNexusIdentifier()
        {
            var expected = new MdmId {
                Identifier = "1", IsMdmId = true
            };
            var entity = new SourceSystem {
                Identifiers = new MdmIdList {
                    new MdmId(), expected
                }
            };

            var candidate = entity.ToMdmKey();

            Assert.AreEqual(1, candidate);
        }