Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Asserts? #51

Closed
karpikpl opened this issue Jan 31, 2023 · 2 comments
Closed

Issue with Asserts? #51

karpikpl opened this issue Jan 31, 2023 · 2 comments

Comments

@karpikpl
Copy link
Collaborator

karpikpl commented Jan 31, 2023

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"});
chullybun added a commit that referenced this issue Feb 9, 2023
chullybun added a commit that referenced this issue Feb 9, 2023
* Resolve issues #51 and #52.

* Fix value expectations test,

* Update log output for test troubleshooting

* Adjust delay check for NUnit
@chullybun
Copy link
Collaborator

Published NuGet package v2.1.2.

@karpikpl
Copy link
Collaborator Author

karpikpl commented Mar 3, 2023

fix worked

@karpikpl karpikpl closed this as completed Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants