Skip to content

Issue with Asserts? #51

@karpikpl

Description

@karpikpl

I have a following tests that passes with "UnitTestEx.Xunit" Version="2.1.1"

		// Arrange
		using var test = CreateApiTester<Startup>();

		// Act
		var result = test
			.Controller<SampleController>()
			.Run(c => c.Get("thisIsATest"))
			.AssertOK()
			.AssertJson("{\"data\": \"this_is_a_test\"}");

but this also passes and shouldn't

		// Act
		var result = test
			.Controller<SampleController>()
			.Run(c => c.Get("thisIsATest"))
			.AssertOK()
			.Assert(new { foo="bar"});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions