Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>

<LangVersion>12.0</LangVersion>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
582 changes: 313 additions & 269 deletions src/AwesomeAssertions.Analyzers.TestUtils/GenerateCode.cs

Large diffs are not rendered by default.

33 changes: 27 additions & 6 deletions src/AwesomeAssertions.Analyzers.Tests/TestAttributes.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;

namespace AwesomeAssertions.Analyzers.Tests;
Expand All @@ -26,17 +27,23 @@ public class AssertionDiagnosticAttribute : Attribute, ITestDataSource
{
public string Assertion { get; }

public AssertionDiagnosticAttribute(string assertion) => Assertion = assertion;
public string[] AdditionalParameters { get; }

public AssertionDiagnosticAttribute(string assertion, params string[] additionalParameters)
{
Assertion = assertion;
AdditionalParameters = additionalParameters ?? Array.Empty<string>();
}

public IEnumerable<object[]> GetData(MethodInfo methodInfo)
{
foreach (var assertion in TestCasesInputUtils.GetTestCases(Assertion))
{
yield return new object[] { assertion };
yield return new object[] { assertion }.Concat(AdditionalParameters).ToArray();
}
}

public string GetDisplayName(MethodInfo methodInfo, object[] data) => $"{methodInfo.Name}(\"{data[0]}\")";
public string GetDisplayName(MethodInfo methodInfo, object[] data) => $"{methodInfo.Name}(\"{string.Join("\", \"", data)}\")";
}

[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
Expand All @@ -52,18 +59,32 @@ public class AssertionCodeFixAttribute : Attribute, ITestDataSource
{
public string OldAssertion { get; }
public string NewAssertion { get; }
public string[] AdditionalParameters { get; }

public AssertionCodeFixAttribute(string oldAssertion, string newAssertion) => (OldAssertion, NewAssertion) = (oldAssertion, newAssertion);
public AssertionCodeFixAttribute(string oldAssertion, string newAssertion, params string[] additionalParameters)
{
OldAssertion = oldAssertion;
NewAssertion = newAssertion;
AdditionalParameters = additionalParameters ?? Array.Empty<string>();
}

public IEnumerable<object[]> GetData(MethodInfo methodInfo)
{
foreach (var (oldAssertion, newAssertion) in TestCasesInputUtils.GetTestCases(OldAssertion, NewAssertion))
{
yield return new object[] { oldAssertion, newAssertion };
yield return new object[] { oldAssertion, newAssertion }.Concat(AdditionalParameters).ToArray();
}
}

public string GetDisplayName(MethodInfo methodInfo, object[] data) => $"{methodInfo.Name}(\"old: {data[0]}\", new: {data[1]}\")";
public string GetDisplayName(MethodInfo methodInfo, object[] data)
{
if (AdditionalParameters.Length == 0)
{
return $"{methodInfo.Name}(\"old: {data[0]}\", \"new: {data[1]}\")";
}

return $"{methodInfo.Name}(\"old: {data[0]}\", \"new: {data[1]}\", \"{string.Join("\", \"", AdditionalParameters)}\")";
}
}

[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
Expand Down
143 changes: 123 additions & 20 deletions src/AwesomeAssertions.Analyzers.Tests/Tips/CollectionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -711,10 +711,10 @@ public void CollectionShouldContainSingle_TestAnalyzer_GenericIEnumerableShouldR
Id = AwesomeAssertionsAnalyzer.DiagnosticId,
Message = DiagnosticMetadata.CollectionShouldContainSingle_ShouldHaveCount1.Message,
VisitorName = DiagnosticMetadata.CollectionShouldContainSingle_ShouldHaveCount1.Name,
Locations = new DiagnosticResultLocation[]
{
Locations =
[
new DiagnosticResultLocation("Test0.cs", 11,13)
},
],
Severity = DiagnosticSeverity.Info
});
}
Expand Down Expand Up @@ -841,10 +841,12 @@ public void CollectionShouldContainSingle_TestAnalyzer_GenericIEnumerableShouldR
[TestMethod]
[AssertionDiagnostic("actual[0].Children[0].Parent.Should().Be(expectedItem);")]
[AssertionDiagnostic("actual[0].Parent.Should().Be(expectedItem);")]
[Implemented]
public void CollectionShouldHaveElementAt_AccessPropertyOfIndexedValue_TestNoAnalyzer(string assertion) =>
DiagnosticVerifier.VerifyCSharpDiagnosticUsingAllAnalyzers(GenerateCode.GenericIListCodeBlockAssertion(assertion));

[TestMethod]
[Implemented]
public void CollectionShouldHaveElementAt_AccessObjectPropertyOfIndexedValue_TestNoAnalyzer()
{
// I cannot see the relevant difference to CollectionShouldHaveElementAt_AccessPropertyOfIndexedValue_TestNoAnalyzer,
Expand All @@ -866,6 +868,107 @@ public void TestMethod(List<Value> list)
DiagnosticVerifier.VerifyCSharpDiagnosticUsingAllAnalyzers(source);
}

[TestMethod]
[Implemented]
public void CollectionShouldHaveElementAt_ClassDoesNotImplementIList_TestNoAnalyzer()
{
string source = """
using AwesomeAssertions;

public class RandomClass
{
public double this[string parameterName] => 42.0;
}

public sealed class TestClass
{
public void TestMethod(RandomClass actual) =>
actual["SomeProperty"].Should().Be(42.0);
}
""";
DiagnosticVerifier.VerifyCSharpDiagnosticUsingAllAnalyzers(source);
}

[TestMethod]
[AssertionDiagnostic("actual[12].Should().Be(42.0{0});", "double")]
[AssertionDiagnostic("actual[12].Should().Be(new object(){0});", "object")]
[Implemented]
public void CollectionShouldHaveElementAt_ClassImplementsIReadOnlyList_TestAnalyzer(string assertion, string genericType)
{
string source = GenerateCode.GenericAssertionOnClassWhichImplementsIReadOnlyList(genericType, assertion);

var metadata = DiagnosticMetadata.CollectionShouldHaveElementAt_IndexerShouldBe;
DiagnosticVerifier.VerifyCSharpDiagnosticUsingAllAnalyzers(source, new DiagnosticResult
{
Id = AwesomeAssertionsAnalyzer.DiagnosticId,
Message = metadata.Message,
VisitorName = metadata.Name,
Locations =
[
new DiagnosticResultLocation("Test0.cs", 20, 13)
],
Severity = DiagnosticSeverity.Info
});
}

[TestMethod]
[AssertionCodeFix(
oldAssertion: "actual[12].Should().Be(42.0);",
newAssertion: "actual.Should().HaveElementAt(12, 42.0);",
"double")]
[AssertionCodeFix(
oldAssertion: "actual[12].Should().Be(new object());",
newAssertion: "actual.Should().HaveElementAt(12, new object());",
"object")]
[Implemented]
public void CollectionShouldHaveElementAt_ClassImplementsIReadOnlyList_TestCodeFix(string oldAssertion, string newAssertion, string genericType)
{
string oldSource = GenerateCode.GenericAssertionOnClassWhichImplementsIReadOnlyList(genericType, oldAssertion);
string newSource = GenerateCode.GenericAssertionOnClassWhichImplementsIReadOnlyList(genericType, newAssertion);

VerifyFix(oldSource, newSource);
}

[TestMethod]
[AssertionDiagnostic("actual[12].Should().Be(42.0{0});", "double")]
[AssertionDiagnostic("actual[12].Should().Be(new object(){0});", "object")]
[Implemented]
public void CollectionShouldHaveElementAt_ClassImplementsIList_TestAnalyzer(string assertion, string genericType)
{
string source = GenerateCode.GenericAssertionOnClassWhichImplementsIList(genericType, assertion);

var metadata = DiagnosticMetadata.CollectionShouldHaveElementAt_IndexerShouldBe;
DiagnosticVerifier.VerifyCSharpDiagnosticUsingAllAnalyzers(source, new DiagnosticResult
{
Id = AwesomeAssertionsAnalyzer.DiagnosticId,
Message = metadata.Message,
VisitorName = metadata.Name,
Locations =
[
new DiagnosticResultLocation("Test0.cs", 33, 13)
],
Severity = DiagnosticSeverity.Info
});
}

[TestMethod]
[AssertionCodeFix(
oldAssertion: "actual[12].Should().Be(42.0);",
newAssertion: "actual.Should().HaveElementAt(12, 42.0);",
"double")]
[AssertionCodeFix(
oldAssertion: "actual[12].Should().Be(new object());",
newAssertion: "actual.Should().HaveElementAt(12, new object());",
"object")]
[Implemented]
public void CollectionShouldHaveElementAt_ClassImplementsIList_TestCodeFix(string oldAssertion, string newAssertion, string genericType)
{
string oldSource = GenerateCode.GenericAssertionOnClassWhichImplementsIList(genericType, oldAssertion);
string newSource = GenerateCode.GenericAssertionOnClassWhichImplementsIList(genericType, newAssertion);

VerifyFix(oldSource, newSource);
}

[TestMethod]
[AssertionDiagnostic("var first = actual[0]; first[6].Should().Be(expectedItem{0});")]
[Implemented]
Expand Down Expand Up @@ -1132,7 +1235,7 @@ public void TestMethod(List<Value> list)
[Ignore("What Should Happen?")]
public void CollectionShouldHaveElementAt0Null_TestCodeFix(string oldAssertion, string newAssertion) => VerifyCSharpFixCodeBlock(oldAssertion, newAssertion);

private void VerifyCSharpDiagnosticCodeBlock(string sourceAssertion, DiagnosticMetadata metadata)
private static void VerifyCSharpDiagnosticCodeBlock(string sourceAssertion, DiagnosticMetadata metadata)
{
var source = GenerateCode.GenericIListCodeBlockAssertion(sourceAssertion);

Expand All @@ -1141,15 +1244,15 @@ private void VerifyCSharpDiagnosticCodeBlock(string sourceAssertion, DiagnosticM
Id = AwesomeAssertionsAnalyzer.DiagnosticId,
Message = metadata.Message,
VisitorName = metadata.Name,
Locations = new DiagnosticResultLocation[]
{
Locations =
[
new DiagnosticResultLocation("Test0.cs", 11,13)
},
],
Severity = DiagnosticSeverity.Info
});
}

private void VerifyCSharpDiagnosticExpressionBody(string sourceAssertion, DiagnosticMetadata metadata)
private static void VerifyCSharpDiagnosticExpressionBody(string sourceAssertion, DiagnosticMetadata metadata)
{
var source = GenerateCode.GenericIListExpressionBodyAssertion(sourceAssertion);

Expand All @@ -1158,15 +1261,15 @@ private void VerifyCSharpDiagnosticExpressionBody(string sourceAssertion, Diagno
Id = AwesomeAssertionsAnalyzer.DiagnosticId,
VisitorName = metadata.Name,
Message = metadata.Message,
Locations = new DiagnosticResultLocation[]
{
new DiagnosticResultLocation("Test0.cs", 10,16)
},
Locations =
[
new DiagnosticResultLocation("Test0.cs", 10, 28)
],
Severity = DiagnosticSeverity.Info
});
}

private void VerifyArrayCSharpDiagnosticCodeBlock(string sourceAssertion, DiagnosticMetadata metadata)
private static void VerifyArrayCSharpDiagnosticCodeBlock(string sourceAssertion, DiagnosticMetadata metadata)
{
var source = GenerateCode.GenericArrayCodeBlockAssertion(sourceAssertion);

Expand All @@ -1175,39 +1278,39 @@ private void VerifyArrayCSharpDiagnosticCodeBlock(string sourceAssertion, Diagno
Id = AwesomeAssertionsAnalyzer.DiagnosticId,
Message = metadata.Message,
VisitorName = metadata.Name,
Locations = new DiagnosticResultLocation[]
{
Locations =
[
new DiagnosticResultLocation("Test0.cs", 11,13)
},
],
Severity = DiagnosticSeverity.Info
});
}

private void VerifyArrayCSharpFixCodeBlock(string oldSourceAssertion, string newSourceAssertion)
private static void VerifyArrayCSharpFixCodeBlock(string oldSourceAssertion, string newSourceAssertion)
{
var oldSource = GenerateCode.GenericArrayCodeBlockAssertion(oldSourceAssertion);
var newSource = GenerateCode.GenericArrayCodeBlockAssertion(newSourceAssertion);

VerifyFix(oldSource, newSource);
}

private void VerifyCSharpFixCodeBlock(string oldSourceAssertion, string newSourceAssertion)
private static void VerifyCSharpFixCodeBlock(string oldSourceAssertion, string newSourceAssertion)
{
var oldSource = GenerateCode.GenericIListCodeBlockAssertion(oldSourceAssertion);
var newSource = GenerateCode.GenericIListCodeBlockAssertion(newSourceAssertion);

VerifyFix(oldSource, newSource);
}

private void VerifyCSharpFixExpressionBody(string oldSourceAssertion, string newSourceAssertion)
private static void VerifyCSharpFixExpressionBody(string oldSourceAssertion, string newSourceAssertion)
{
var oldSource = GenerateCode.GenericIListExpressionBodyAssertion(oldSourceAssertion);
var newSource = GenerateCode.GenericIListExpressionBodyAssertion(newSourceAssertion);

VerifyFix(oldSource, newSource);
}

private void VerifyFix(string oldSource, string newSource)
private static void VerifyFix(string oldSource, string newSource)
{
DiagnosticVerifier.VerifyFix(new CodeFixVerifierArguments()
.WithCodeFixProvider<AwesomeAssertionsCodeFixProvider>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ public void TestMethod(MultiKeyDict<int, int, string> actual)
public void DictionaryShouldContainPair_TestCodeFix(string oldAssertion, string newAssertion) => VerifyCSharpFix(oldAssertion, newAssertion);

[TestMethod]
[Implemented]
public void DictionaryWithIntValue_ShouldBe_NoDiagnostic()
{
string assertion = "actual[\"one\"].Should().Be(1);";
Expand Down
19 changes: 6 additions & 13 deletions src/AwesomeAssertions.Analyzers/Tips/AwesomeAssertionsAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace AwesomeAssertions.Analyzers;

[DiagnosticAnalyzer(LanguageNames.CSharp)]

Check warning on line 12 in src/AwesomeAssertions.Analyzers/Tips/AwesomeAssertionsAnalyzer.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)

Check warning on line 12 in src/AwesomeAssertions.Analyzers/Tips/AwesomeAssertionsAnalyzer.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)

Check warning on line 12 in src/AwesomeAssertions.Analyzers/Tips/AwesomeAssertionsAnalyzer.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)

Check warning on line 12 in src/AwesomeAssertions.Analyzers/Tips/AwesomeAssertionsAnalyzer.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)

Check warning on line 12 in src/AwesomeAssertions.Analyzers/Tips/AwesomeAssertionsAnalyzer.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)

Check warning on line 12 in src/AwesomeAssertions.Analyzers/Tips/AwesomeAssertionsAnalyzer.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)

Check warning on line 12 in src/AwesomeAssertions.Analyzers/Tips/AwesomeAssertionsAnalyzer.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)

Check warning on line 12 in src/AwesomeAssertions.Analyzers/Tips/AwesomeAssertionsAnalyzer.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)

Check warning on line 12 in src/AwesomeAssertions.Analyzers/Tips/AwesomeAssertionsAnalyzer.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)
public partial class AwesomeAssertionsAnalyzer : DiagnosticAnalyzer
{
public const string Title = "Simplify Assertion";
Expand Down Expand Up @@ -179,7 +179,7 @@
case nameof(Enumerable.OrderByDescending) when IsEnumerableMethodWithPredicate(invocationBeforeShould, metadata) && invocationBeforeShould.Arguments[0].IsSameArgumentReference(assertion.Arguments[0]):
context.ReportDiagnostic(CreateDiagnostic(assertion, DiagnosticMetadata.CollectionShouldBeInDescendingOrder_OrderByDescendingShouldEqual));
return;
case nameof(Enumerable.Select) when IsEnumerableMethodWithPredicate(invocationBeforeShould, metadata)
case nameof(Enumerable.Select) when IsEnumerableMethodWithPredicate(invocationBeforeShould, metadata)
&& assertion.Arguments[0].Value is IInvocationOperation { TargetMethod.Name: nameof(Enumerable.Select), Arguments.Length: 2 } expectedInvocation && expectedInvocation.Arguments[1].IsLambda():
context.ReportDiagnostic(CreateDiagnostic(assertion, DiagnosticMetadata.CollectionShouldEqualOtherCollectionByComparer_SelectShouldEqualOtherCollectionSelect));
return;
Expand Down Expand Up @@ -361,8 +361,7 @@
}
}
if (subject is IPropertyReferenceOperation propertyReference && propertyReference.Property.Name is WellKnownMemberNames.Indexer
&& !(subject.Type.AllInterfaces.Contains(metadata.IDictionaryOfT2) || subject.Type.AllInterfaces.Contains(metadata.IReadonlyDictionaryOfT2))
&& !(propertyReference.Property.ContainingType.ImplementsOrIsInterface(metadata.IDictionaryOfT2) || propertyReference.Property.ContainingType.ImplementsOrIsInterface(metadata.IReadonlyDictionaryOfT2)))
&& (propertyReference.Instance.Type.ImplementsOrIsInterface(metadata.IListOfT) || propertyReference.Instance.Type.ImplementsOrIsInterface(metadata.IReadonlyListOfT)))
{
context.ReportDiagnostic(CreateDiagnostic(assertion, DiagnosticMetadata.CollectionShouldHaveElementAt_IndexerShouldBe));
}
Expand All @@ -389,23 +388,17 @@
}
}

if (subject is IPropertyReferenceOperation propertyReferenceOperation)
{
return;
}
else if (subject.TryGetSingleChild<IPropertyReferenceOperation>(out var previousPropertyReference) && !previousPropertyReference.Property.IsIndexer)
if (subject.TryGetSingleChildOrSelf<IPropertyReferenceOperation>(out var propertyReference) && !propertyReference.Property.IsIndexer)
{
return;
}
else if (subject.TryGetFirstDescendent<IArrayElementReferenceOperation>(out _))
{
context.ReportDiagnostic(CreateDiagnostic(assertion, DiagnosticMetadata.CollectionShouldHaveElementAt_IndexerShouldBe));
}
else if (subject.TryGetFirstDescendent<IPropertyReferenceOperation>(out var propertyReference) && propertyReference.Property.IsIndexer)
else if (subject.TryGetFirstDescendentOrSelf(out propertyReference) && propertyReference.Property.IsIndexer &&
(propertyReference.Instance.Type.ImplementsOrIsInterface(metadata.IListOfT) || propertyReference.Instance.Type.ImplementsOrIsInterface(metadata.IReadonlyListOfT)))
{
if (!propertyReference.Instance.Type.ImplementsOrIsInterface(metadata.IListOfT) && !propertyReference.Instance.Type.ImplementsOrIsInterface(metadata.IReadonlyListOfT)) return;
if (propertyReference.Instance.Type.ImplementsOrIsInterface(metadata.IDictionaryOfT2) || propertyReference.Instance.Type.ImplementsOrIsInterface(metadata.IReadonlyDictionaryOfT2)) return;

context.ReportDiagnostic(CreateDiagnostic(assertion, DiagnosticMetadata.CollectionShouldHaveElementAt_IndexerShouldBe));
}
}
Expand Down Expand Up @@ -494,7 +487,7 @@
context.ReportDiagnostic(CreateDiagnostic(assertion, DiagnosticMetadata.CollectionShouldHaveCountLessThanOrEqualTo_CountShouldBeLessThanOrEqualTo));
return;
case nameof(Math.Abs) when invocationBeforeShould.IsContainedInType(metadata.Math) && (
assertion.Arguments[0].IsReferenceOfType(SpecialType.System_Double)
assertion.Arguments[0].IsReferenceOfType(SpecialType.System_Double)
|| assertion.Arguments[0].IsReferenceOfType(SpecialType.System_Single)
|| assertion.Arguments[0].IsReferenceOfType(SpecialType.System_Decimal)
):
Expand Down
Loading
Loading