Skip to content

Commit

Permalink
GH-186 - manually 'skipping' ThrowsAsync like tests cases for literal…
Browse files Browse the repository at this point in the history
… expressions
  • Loading branch information
tpodolak committed Jul 22, 2022
1 parent a1c04c6 commit 95d877f
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ public void Test()

public override async Task ReportsDiagnostics_WhenSettingValueForLiteral(string method, string literal, string type)
{
if (method.Contains("Async"))
{
// ThrowsAsync like methods do not extend literals
// TODO replace with Assert.Skip once xUnit v3 released
// https://github.com/xunit/xunit/issues/2073
return;
}

var source = $@"using System;
using NSubstitute;
using NSubstitute.ExceptionExtensions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ public void Test()

public override async Task ReportsDiagnostics_WhenSettingValueForLiteral(string method, string literal, string type)
{
if (method.Contains("Async"))
{
// ThrowsAsync like methods do not extend literals
// TODO replace with Assert.Skip once xUnit v3 released
// https://github.com/xunit/xunit/issues/2073
return;
}

var source = $@"using System;
using NSubstitute;
using NSubstitute.ExceptionExtensions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ public void Test()

public override async Task ReportsDiagnostics_WhenSettingValueForLiteral(string method, string literal, string type)
{
if (method.Contains("Async"))
{
// ThrowsAsync like methods do not extend literals
// TODO replace with Assert.Skip once xUnit v3 released
// https://github.com/xunit/xunit/issues/2073
return;
}

var source = $@"using System;
using NSubstitute;
using NSubstitute.ExceptionExtensions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ public void Test()

public override async Task ReportsDiagnostics_WhenSettingValueForLiteral(string method, string literal, string type)
{
if (method.Contains("Async"))
{
// ThrowsAsync like methods do not extend literals
// TODO replace with Assert.Skip once xUnit v3 released
// https://github.com/xunit/xunit/issues/2073
return;
}

var source = $@"using System;
using NSubstitute;
using NSubstitute.ExceptionExtensions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using NSubstitute.Analyzers.Shared.Settings;
using NSubstitute.Analyzers.Tests.Shared.Extensibility;
using NSubstitute.Analyzers.Tests.Shared.Extensions;
using Xunit;

namespace NSubstitute.Analyzers.Tests.VisualBasic.DiagnosticAnalyzersTests.NonSubstitutableMemberAnalyzerTests;

Expand Down Expand Up @@ -39,6 +40,14 @@ End Namespace

public override async Task ReportsDiagnostics_WhenSettingValueForLiteral(string method, string literal, string type)
{
if (method.Contains("Async"))
{
// ThrowsAsync like methods do not extend literals
// TODO replace with Assert.Skip once xUnit v3 released
// https://github.com/xunit/xunit/issues/2073
return;
}

var source = $@"Imports System
Imports NSubstitute
Imports NSubstitute.ExceptionExtensions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ End Namespace

public override async Task ReportsDiagnostics_WhenSettingValueForLiteral(string method, string literal, string type)
{
if (method.Contains("Async"))
{
// ThrowsAsync like methods do not extend literals
// TODO replace with Assert.Skip once xUnit v3 released
// https://github.com/xunit/xunit/issues/2073
return;
}

var source = $@"Imports System
Imports NSubstitute
Imports NSubstitute.ExceptionExtensions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ End Namespace

public override async Task ReportsDiagnostics_WhenSettingValueForLiteral(string method, string literal, string type)
{
if (method.Contains("Async"))
{
// ThrowsAsync like methods do not extend literals
// TODO replace with Assert.Skip once xUnit v3 released
// https://github.com/xunit/xunit/issues/2073
return;
}

var source = $@"Imports System
Imports NSubstitute
Imports NSubstitute.ExceptionExtensions
Expand Down

0 comments on commit 95d877f

Please sign in to comment.