示例#1
0
        public void IsSameOrSubtypeOfAny_WhenOtherTypesIsNull_Throws()
        {
            var type = new FileType("id", "description", null);

            Assert.Throws<ArgumentNullException>(() => type.IsSameOrSubtypeOfAny(null));
        }
示例#2
0
        public void IsSameOrSubtypeOfAny_WhenOtherTypesContainsUnrelatedAndSame_ReturnsTrue()
        {
            var superType = new FileType("superId", "superDescription", null);
            var type = new FileType("id", "description", superType);
            var unrelatedType = new FileType("otherId", "otherDescription", superType);

            Assert.IsTrue(type.IsSameOrSubtypeOfAny(unrelatedType, type));
        }
示例#3
0
        public void IsSameOrSubtypeOfAny_WhenOtherTypesIsEmpty_ReturnsFalse()
        {
            var type = new FileType("id", "description", null);

            Assert.IsFalse(type.IsSameOrSubtypeOfAny());
        }
示例#4
0
        public void IsSameOrSubtypeOfAny_WhenOtherTypesIsUnrelated_ReturnsFalse()
        {
            var superType = new FileType("superId", "superDescription", null);
            var type = new FileType("id", "description", superType);
            var unrelatedType = new FileType("otherId", "otherDescription", superType);

            Assert.IsFalse(type.IsSameOrSubtypeOfAny(unrelatedType));
        }
示例#5
0
        public void IsSameOrSubtypeOfAny_WhenOtherTypesContainsSame_ReturnsTrue()
        {
            var type = new FileType("id", "description", null);

            Assert.IsTrue(type.IsSameOrSubtypeOfAny(type));
        }