예제 #1
0
        public void AreContentsEqual_AllSame_ReturnsTrue()
        {
            var r1 = new Role("codered", "Jaguar", "black");
            var r2 = new Role("codered", "Jaguar", "black");

            Assert.IsTrue(r1.AreContentsEqual(r2));
        }
예제 #2
0
        public void AreContentsEqual_DifferentDefinitions_ReturnsFalse()
        {
            var r1 = new Role("codered", "Jaguar", "black");
            var r2 = new Role("codered", "Jaguar", "brown");

            Assert.IsFalse(r1.AreContentsEqual(r2));
        }
예제 #3
0
        public void AreContentsEqual_DifferentNames_ReturnsFalse()
        {
            var r1 = new Role("codered", "Jaguar", null);
            var r2 = new Role("codered", "Aston Martin", null);

            Assert.IsFalse(r1.AreContentsEqual(r2));
        }
예제 #4
0
        public void AreContentsEqual_DifferentCodes_ReturnsFalse()
        {
            var r1 = new Role("codered", null, null);
            var r2 = new Role("codeblue", null, null);

            Assert.IsFalse(r1.AreContentsEqual(r2));
        }
예제 #5
0
        public void AreContentsEqual_OtherIsNull_ReturnsFalse()
        {
            var r = new Role(null, null, null);

            Assert.IsFalse(r.AreContentsEqual(null));
        }
예제 #6
0
        public void Clone_ReturnsSameContent()
        {
            var r = new Role("code", "name", "def");

            Assert.IsTrue(r.AreContentsEqual(r.Clone()));
        }