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

Support net3.5 in RdFramework.Tests #377

Open
ulex opened this issue Jan 24, 2023 · 4 comments
Open

Support net3.5 in RdFramework.Tests #377

ulex opened this issue Jan 24, 2023 · 4 comments

Comments

@ulex
Copy link
Collaborator

ulex commented Jan 24, 2023

#374 (comment)

It looks like it was removed accidentally.

@ulex
Copy link
Collaborator Author

ulex commented Jan 25, 2023

Compilation fixed in net35-test.rdframework branch, but tests fail with weird exception

Async test method must return an awaitable with a void result when no result is expected

Though the signature of the test method doesn't contain async void.

...
[Test]
public async Task TestAsync()
...

@ForNeVeR
Copy link
Collaborator

I'd guess that the problem is that there's no Task type in the .NET Framework 3.5 standard library. So, NUnit is unable to figure out that we use that separate Tasks package, and thus any Task-returning tests fail.

Do we have a lot of such tests in our code?

@ulex
Copy link
Collaborator Author

ulex commented Jan 26, 2023

We have 33 such tests and all located in Reflection part.
The issue is caused by the absence of the GetAwaiter method in the Task type from TPL which we use. I found a workaround to this problem using a type from AsyncBridge , but it smells and makes writing async tests harder db8b20f

I would rather prefer not to include tests for net3.5 for reflection at all (0a8bdb1)

The branch is ready to merge. If you don't have objections I will create a PR.

@ForNeVeR
Copy link
Collaborator

I would rather prefer not to include tests for net3.5 for reflection at all

AFAIK, Rd.Reflection is not used in Rd for .NET 3.5. So, this suggestion makes sense.

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