maca88 / AsyncGenerator

Generating async c# code using Roslyn
MIT License
47 stars 16 forks source link

Fix transforming NUnit Assert.That when using generic argument #160

Closed maca88 closed 2 years ago

maca88 commented 2 years ago

Fixes the following code:

var result = false;
Assert.That<bool>(() => result = SimpleFile.Write(""), Throws.Nothing);

to be generated as:

var result = false;
Assert.That<Task<bool>>(async () => result = await (SimpleFile.WriteAsync("")), Throws.Nothing);

where currently the generic argument for Assert.That is not wrapped into a Task<>.