Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Jetbrains.Annotations attributes accordingly #39

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion AsyncConverter.Tests/AsyncConverter.Rider.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
<ProjectReference Include="..\AsyncConverter\AsyncConverter.Rider.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="JetBrains.Rider.SDK.Tests" Version="2018.1.0" />
<PackageReference Include="JetBrains.Rider.SDK.Tests" Version="2018.1.2" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion AsyncConverter.Tests/AsyncConverter.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<None Remove="Test\Data\**\*.cs.tmp" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="JetBrains.ReSharper.SDK.Tests" Version="2018.1.0" />
<PackageReference Include="JetBrains.ReSharper.SDK.Tests" Version="2018.1.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AsyncConverter\AsyncConverter.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using AsyncConverter.Settings.General;
using JetBrains.ReSharper.TestFramework;

namespace AsyncConverter.Tests.Highlightings
{
[TestSetting(typeof(GeneralSettings), nameof(GeneralSettings.ExcludeTestMethodsFromConfigureAwait), false)]
public class ConfigureAwaitOnTestTests : HighlightingsTestsBase
{
protected override string Folder => "ConfigureAwait/OnTest";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace AsyncConverter.Tests.Highlightings
{
public class ConfigureAwaitTests : HighlightingsTestsBase
{
protected override string Folder => "ConfigureAwait/Common";
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using AsyncConverter.Settings.ConfigureAwaitOptions;
using AsyncConverter.Settings.ConfigureAwaitOptions;
using JetBrains.Application.Settings;

namespace AsyncConverter.Tests.Highlightings
Expand All @@ -9,6 +9,6 @@ protected override void MutateSettings(IContextBoundSettingsStore settingsStore)
{
settingsStore.SetIndexedValue((AsyncConverterConfigureAwaitSettings s) => s.ConfigureAwaitIgnoreAttributeTypes, "MyCustomAttribute", "AsyncConverter.Tests.Test.Data.Highlightings.ConfigureAwaitWithAttribute.MyCustomAttribute");
}
protected override string Folder => "ConfigureAwaitWithAttribute";
protected override string Folder => "ConfigureAwait/WithAttribute";
}
}
7 changes: 0 additions & 7 deletions AsyncConverter.Tests/Highlightings/ConfigureAwaitTests.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Threading.Tasks;

namespace AsyncConverter.Tests.Test.Data.FixReturnValueToTaskTests
{
using Microsoft.VisualStudio.TestTools.UnitTesting;
public class Class
{
[TestMethod]
public async Task Test()
{
await Task.Delay(1000);
}
}
}

namespace Microsoft.VisualStudio.TestTools.UnitTesting
{
public class TestMethodAttribute : Attribute
{ }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;
using System.Threading.Tasks;

namespace AsyncConverter.Tests.Test.Data.FixReturnValueToTaskTests
{
using Microsoft.VisualStudio.TestTools.UnitTesting;
public class Class
{
[TestMethod]
public async Task Test()
{
await Task.Delay(1000);
}
}
}

namespace Microsoft.VisualStudio.TestTools.UnitTesting
{
public class TestMethodAttribute : Attribute
{ }
}
---------------------------------------------------------
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Threading.Tasks;

namespace AsyncConverter.Tests.Test.Data.FixReturnValueToTaskTests
{
using NUnit.Framework;
public class Class
{
[Test]
public async Task Test()
{
await Task.Delay(1000);
}
}
}

namespace NUnit.Framework
{
public class TestAttribute : Attribute
{ }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;
using System.Threading.Tasks;

namespace AsyncConverter.Tests.Test.Data.FixReturnValueToTaskTests
{
using NUnit.Framework;
public class Class
{
[Test]
public async Task Test()
{
await Task.Delay(1000);
}
}
}

namespace NUnit.Framework
{
public class TestAttribute : Attribute
{ }
}

---------------------------------------------------------
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Threading.Tasks;

namespace AsyncConverter.Tests.Test.Data.FixReturnValueToTaskTests
{
using Microsoft.VisualStudio.TestTools.UnitTesting;
public class Class
{
[TestMethod]
public async Task Test()
{
await Task.Delay(1000);
}
}
}

namespace Microsoft.VisualStudio.TestTools.UnitTesting
{
public class TestMethodAttribute : Attribute
{ }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;
using System.Threading.Tasks;

namespace AsyncConverter.Tests.Test.Data.FixReturnValueToTaskTests
{
using Microsoft.VisualStudio.TestTools.UnitTesting;
public class Class
{
[TestMethod]
public async Task Test()
{
|await Task.Delay(1000)|(0);
}
}
}

namespace Microsoft.VisualStudio.TestTools.UnitTesting
{
public class TestMethodAttribute : Attribute
{ }
}
---------------------------------------------------------
(0): ReSharper Warning: (T) 'If await not configured it may cause deadlock, if this code will be call synchronously' (E) 'Await not configured'
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Threading.Tasks;

namespace AsyncConverter.Tests.Test.Data.FixReturnValueToTaskTests
{
using NUnit.Framework;
public class Class
{
[Test]
public async Task Test()
{
await Task.Delay(1000);
}
}
}

namespace NUnit.Framework
{
public class TestAttribute : Attribute
{ }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;
using System.Threading.Tasks;

namespace AsyncConverter.Tests.Test.Data.FixReturnValueToTaskTests
{
using NUnit.Framework;
public class Class
{
[Test]
public async Task Test()
{
|await Task.Delay(1000)|(0);
}
}
}

namespace NUnit.Framework
{
public class TestAttribute : Attribute
{ }
}
---------------------------------------------------------
(0): ReSharper Warning: (T) 'If await not configured it may cause deadlock, if this code will be call synchronously' (E) 'Await not configured'
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Threading.Tasks;

namespace AsyncConverter.Tests.Test.Data.FixReturnValueToTaskTests
{
using NUnit.Framework;
public class Class
{
[TestCase]
public async Task Test()
{
await Task.Delay(1000);
}
}
}

namespace NUnit.Framework
{
public class TestCaseAttribute : Attribute
{ }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;
using System.Threading.Tasks;

namespace AsyncConverter.Tests.Test.Data.FixReturnValueToTaskTests
{
using NUnit.Framework;
public class Class
{
[TestCase]
public async Task Test()
{
|await Task.Delay(1000)|(0);
}
}
}

namespace NUnit.Framework
{
public class TestCaseAttribute : Attribute
{ }
}
---------------------------------------------------------
(0): ReSharper Warning: (T) 'If await not configured it may cause deadlock, if this code will be call synchronously' (E) 'Await not configured'
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Threading.Tasks;

namespace AsyncConverter.Tests.Test.Data.FixReturnValueToTaskTests
{
using Xunit;
public class Class
{
[Fact]
public async Task Test()
{
await Task.Delay(1000);
}
}
}

namespace Xunit
{
public class FactAttribute : Attribute
{ }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;
using System.Threading.Tasks;

namespace AsyncConverter.Tests.Test.Data.FixReturnValueToTaskTests
{
using Xunit;
public class Class
{
[Fact]
public async Task Test()
{
|await Task.Delay(1000)|(0);
}
}
}

namespace Xunit
{
public class FactAttribute : Attribute
{ }
}
---------------------------------------------------------
(0): ReSharper Warning: (T) 'If await not configured it may cause deadlock, if this code will be call synchronously' (E) 'Await not configured'
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Threading.Tasks;

namespace AsyncConverter.Tests.Test.Data.FixReturnValueToTaskTests
{
using Xunit;
public class Class
{
[Theory]
public async Task Test()
{
await Task.Delay(1000);
}
}
}

namespace Xunit
{
public class TheoryAttribute : Attribute
{ }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;
using System.Threading.Tasks;

namespace AsyncConverter.Tests.Test.Data.FixReturnValueToTaskTests
{
using Xunit;
public class Class
{
[Theory]
public async Task Test()
{
|await Task.Delay(1000)|(0);
}
}
}

namespace Xunit
{
public class TheoryAttribute : Attribute
{ }
}
---------------------------------------------------------
(0): ReSharper Warning: (T) 'If await not configured it may cause deadlock, if this code will be call synchronously' (E) 'Await not configured'
Loading