public async Task IsAssignableFromWhenOtherIsNull()
        {
            var @this = (await this.GetTypeSymbolAsync(
                             $"{ITypeSymbolExtensionsTests.BasePath}{(nameof(this.IsAssignableFromWhenOtherIsNull))}.cs",
                             new[] { $"{nameof(ITypeSymbolExtensionsTests)}{nameof(IsAssignableFromWhenOtherIsNull)}" }))[0];

            Assert.That(@this.IsAssignableFrom(null as ITypeSymbol), Is.False);
        }
        public async Task IsAssignableFromWhenOtherIsSameTypeAsThis()
        {
            var @this = (await this.GetTypeSymbolAsync(
                             $"{ITypeSymbolExtensionsTests.BasePath}{(nameof(this.IsAssignableFromWhenOtherIsSameTypeAsThis))}.cs",
                             new[] { $"{nameof(ITypeSymbolExtensionsTests)}{nameof(IsAssignableFromWhenOtherIsSameTypeAsThis)}" }))[0];
            var other = @this;

            Assert.That(@this.IsAssignableFrom(other), Is.True);
        }
        public async Task IsAssignableFromWhenOtherIsInDifferentAssembly()
        {
            var @this = (await this.GetTypeSymbolAsync(
                             $"{ITypeSymbolExtensionsTests.BasePath}{(nameof(this.IsAssignableFromWhenOtherIsInDifferentAssembly))}.cs",
                             new[] { $"{nameof(ITypeSymbolExtensionsTests)}{nameof(IsAssignableFromWhenOtherIsInDifferentAssembly)}" }))[0];
            var other = (await this.GetTypeSymbolAsync(
                             $"{ITypeSymbolExtensionsTests.BasePath}{(nameof(this.IsAssignableFromWhenOtherIsInDifferentAssembly))}.cs",
                             new[] { $"{nameof(ITypeSymbolExtensionsTests)}{nameof(IsAssignableFromWhenOtherIsInDifferentAssembly)}" }))[0];

            Assert.That(@this.IsAssignableFrom(other), Is.False);
        }
        public async Task IsAssignableFromWhenOtherImplementsInterface()
        {
            var types = await this.GetTypeSymbolAsync(
                $"{ITypeSymbolExtensionsTests.BasePath}{(nameof(this.IsAssignableFromWhenOtherImplementsInterface))}.cs",
                new[]
            {
                $"{nameof(ITypeSymbolExtensionsTests)}{nameof(IsAssignableFromWhenOtherImplementsInterface)}",
                $"{nameof(ITypeSymbolExtensionsTests)}{nameof(IsAssignableFromWhenOtherImplementsInterface)}Type"
            });

            Assert.That(types[0].IsAssignableFrom(types[1]), Is.True);
        }
        public async Task IsAssignableFromWhenOtherIsNotASubclass()
        {
            var types = await this.GetTypeSymbolAsync(
                $"{ITypeSymbolExtensionsTests.BasePath}{(nameof(this.IsAssignableFromWhenOtherIsNotASubclass))}.cs",
                new[]
            {
                $"{nameof(ITypeSymbolExtensionsTests)}{nameof(IsAssignableFromWhenOtherIsNotASubclass)}A",
                $"{nameof(ITypeSymbolExtensionsTests)}{nameof(IsAssignableFromWhenOtherIsNotASubclass)}B"
            });

            Assert.That(types[0].IsAssignableFrom(types[1]), Is.False);
        }
 public async Task IsAssertWhenSymbolIsAssertType()
 {
     Assert.That((await this.GetTypeSymbolFromFieldAsync(
                      $"{ITypeSymbolExtensionsTests.BasePath}{(nameof(this.IsAssertWhenSymbolIsAssertType))}.cs",
                      $"{nameof(ITypeSymbolExtensionsTests)}{nameof(IsAssertWhenSymbolIsAssertType)}")).IsAssert(), Is.True);
 }
 public async Task IsAssertWhenSymbolIsNotInNUnitAssembly()
 {
     Assert.That((await this.GetTypeSymbolFromFieldAsync(
                      $"{ITypeSymbolExtensionsTests.BasePath}{(nameof(this.IsAssertWhenSymbolIsNotInNUnitAssembly))}.cs",
                      $"{nameof(ITypeSymbolExtensionsTests)}{nameof(IsAssertWhenSymbolIsNotInNUnitAssembly)}")).IsAssert(), Is.False);
 }