Exemplo n.º 1
0
        public void IsSameOrSubtypeOfAny_WhenOtherTypesIsNull_Throws()
        {
            var type = new FileType("id", "description", null);

            Assert.Throws<ArgumentNullException>(() => type.IsSameOrSubtypeOfAny(null));
        }
Exemplo n.º 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));
        }
Exemplo n.º 3
0
        public void IsSameOrSubtypeOfAny_WhenOtherTypesIsEmpty_ReturnsFalse()
        {
            var type = new FileType("id", "description", null);

            Assert.IsFalse(type.IsSameOrSubtypeOfAny());
        }
Exemplo n.º 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));
        }
Exemplo n.º 5
0
        public void IsSameOrSubtypeOfAny_WhenOtherTypesContainsSame_ReturnsTrue()
        {
            var type = new FileType("id", "description", null);

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