Skip to content

Asserting on tuples or complex value types fails #160

Description

@adrianiftode

The following test should pass, but fails

    public void When_asserting_response_content_with_a_certain_assertion_to_satisfy_assertion_and_model_is_of_named_tuple_type_it_should_succeed()
    {
        // Arrange
        using var subject = new HttpResponseMessage
        {
            Content = new StringContent(/*lang=json,strict*/ """{ "property" : "Value"}""", Encoding.UTF8, "application/json")
        };
        // Act
        Action act = () =>
            subject.Should().Satisfy<(string Property, object _)>(
                model => model.Property.Should().NotBeNullOrEmpty());

        // Assert
        act.Should().NotThrow();
    }

It fails to deserialize the content into a value type.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions