Skip to content

Commit

Permalink
Update dependency FluentAssertions to v6
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate-bot authored and RehanSaeed committed Aug 13, 2021
1 parent 05ff95f commit 9e8bc9c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ public async Task CanDestructureTaskAsync()
var destructuredTaskProperties = Assert.IsAssignableFrom<IDictionary<string, object>>(destructuredTaskObject);
destructuredTaskProperties.Should().ContainKey(nameof(Task.Id));
destructuredTaskProperties.Should().ContainKey(nameof(Task.Status))
.WhichValue.Should().BeOfType<string>()
.WhoseValue.Should().BeOfType<string>()
.Which.Should().Be(nameof(TaskStatus.Canceled));
destructuredTaskProperties.Should().ContainKey(nameof(Task.CreationOptions))
.WhichValue.Should().BeOfType<string>()
.WhoseValue.Should().BeOfType<string>()
.Which.Should().Contain(nameof(TaskCreationOptions.None));
}

Expand All @@ -124,23 +124,23 @@ public void CanDestructureFaultedTask()
var destructuredTaskProperties = Assert.IsAssignableFrom<IDictionary<string, object>>(destructuredTaskObject);
destructuredTaskProperties.Should().ContainKey(nameof(Task.Id));
destructuredTaskProperties.Should().ContainKey(nameof(Task.Status))
.WhichValue.Should().BeOfType<string>()
.WhoseValue.Should().BeOfType<string>()
.Which.Should().Be(nameof(TaskStatus.Faulted));
destructuredTaskProperties.Should().ContainKey(nameof(Task.CreationOptions))
.WhichValue.Should().BeOfType<string>()
.WhoseValue.Should().BeOfType<string>()
.Which.Should().Be(nameof(TaskCreationOptions.None));
var taskFirstLevelExceptionDictionary = destructuredTaskProperties.Should().ContainKey(nameof(Task.Exception))
.WhichValue.Should().BeAssignableTo<IDictionary<string, object>>()
.WhoseValue.Should().BeAssignableTo<IDictionary<string, object>>()
.Which;
taskFirstLevelExceptionDictionary.Should().ContainKey("Message")
.WhichValue.Should().BeOfType<string>()
.WhoseValue.Should().BeOfType<string>()
.Which.Should().Contain("One or more errors occurred.", "task's first level exception is aggregate exception");
taskFirstLevelExceptionDictionary.Should().ContainKey("InnerExceptions")
.WhichValue.Should().BeAssignableTo<IReadOnlyCollection<object>>()
.WhoseValue.Should().BeAssignableTo<IReadOnlyCollection<object>>()
.Which.Should().ContainSingle()
.Which.Should().BeAssignableTo<IDictionary<string, object>>()
.Which.Should().ContainKey("Message")
.WhichValue.Should().BeOfType<string>()
.WhoseValue.Should().BeOfType<string>()
.Which.Should().Be("INNER EXCEPTION MESSAGE");
}

Expand Down Expand Up @@ -342,16 +342,16 @@ public void WhenObjectContainsCyclicReferencesInTask_ThenRecursiveDestructureIsI
var resultsDictionary = result.GetResultDictionary();
var destructuredTask = resultsDictionary[nameof(CyclicTaskException.Task)].Should().BeAssignableTo<IDictionary<string, object>>().Which;
var destructuredCyclicException = destructuredTask.Should().ContainKey(nameof(Task.Exception))
.WhichValue.Should().BeAssignableTo<IDictionary<string, object>>()
.WhoseValue.Should().BeAssignableTo<IDictionary<string, object>>()
.Which.Should().ContainKey(nameof(AggregateException.InnerExceptions))
.WhichValue.Should().BeAssignableTo<IReadOnlyCollection<object>>()
.WhoseValue.Should().BeAssignableTo<IReadOnlyCollection<object>>()
.Which.Should().ContainSingle()
.Which.Should().BeAssignableTo<IDictionary<string, object>>().Which;
destructuredCyclicException.Should().ContainKey(nameof(Exception.Message))
.WhichValue.Should().BeOfType<string>()
.WhoseValue.Should().BeOfType<string>()
.Which.Should().Contain(nameof(CyclicTaskException));
destructuredCyclicException.Should().ContainKey(nameof(CyclicTaskException.Task))
.WhichValue.Should().BeAssignableTo<IDictionary<string, object>>()
.WhoseValue.Should().BeAssignableTo<IDictionary<string, object>>()
.Which.Should().ContainKey("$ref", "task was already destructured, so inner task should just contain ref");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ItemGroup>

<ItemGroup Label="Package References">
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="FluentAssertions" Version="6.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="5.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>
Expand Down

0 comments on commit 9e8bc9c

Please sign in to comment.