Skip to content

Commit

Permalink
fix: resolve errors during rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyMakkison committed Apr 18, 2023
1 parent 74dbb57 commit 07cd05d
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions test/Riok.Mapperly.Tests/Mapping/EnumerableTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ public void EnumerableToReadOnlyImmutableArrayShouldDiagnostic()
"A",
"B",
"class A { public IEnumerable<int> Value { get; } }",
"class B { public System.Collections.Immutable.ImmutableList<int> Value { get; } }");
"class B { public System.Collections.Immutable.ImmutableArray<int> Value { get; } }");

TestHelper.GenerateMapper(source, TestHelperOptions.AllowInfoDiagnostics)
.Should()
Expand All @@ -910,27 +910,14 @@ public void EnumerableToReadOnlyImmutableHashSetShouldDiagnostic()
var source = TestSourceBuilder.Mapping(
"A",
"B",
"class A { public IEnumerable<int?> Value { get; } }",
"class A { public IEnumerable<int> Value { get; } }",
"class B { public System.Collections.Immutable.ImmutableHashSet<int> Value { get; } }");

TestHelper.GenerateMapper(source, TestHelperOptions.AllowInfoDiagnostics)
.Should()
.HaveDiagnostic(new(DiagnosticDescriptors.CannotMapToReadOnlyMember));
}

[Fact]
public void EnumerableToReadOnlyImmutableHashSetShouldDiagnostic()
public void EnumerableToReadOnlyImmutableQueueShouldDiagnostic()
{
var source = TestSourceBuilder.Mapping(
"A",
"B",
"class A { public IEnumerable<int? Value { get; } }",
"class B { public System.Collections.Immutable.ImmutableHashSet<int> Value { get; } }");

TestHelper.GenerateMapper(source, TestHelperOptions.AllowInfoDiagnostics).Should().HaveDiagnostic(new(DiagnosticDescriptors.SourceMemberNotFound));
}

[Fact]
public void EnumerableToReadOnlyImmutableQueueShouldDiagnostic()
{
Expand Down

0 comments on commit 07cd05d

Please # to comment.