public void IsSameOrSubtypeOfAny_WhenOtherTypesIsNull_Throws() { var type = new FileType("id", "description", null); Assert.Throws<ArgumentNullException>(() => type.IsSameOrSubtypeOfAny(null)); }
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)); }
public void IsSameOrSubtypeOfAny_WhenOtherTypesIsEmpty_ReturnsFalse() { var type = new FileType("id", "description", null); Assert.IsFalse(type.IsSameOrSubtypeOfAny()); }
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)); }
public void IsSameOrSubtypeOfAny_WhenOtherTypesContainsSame_ReturnsTrue() { var type = new FileType("id", "description", null); Assert.IsTrue(type.IsSameOrSubtypeOfAny(type)); }