Closed OsirisTerje closed 8 years ago
Looks good. Based on reading the issue, there is no way to wrap the code under test in an Assert.Throws?
BTW, I edited your PR description a bit so it will auto-close the issue. I hope that was the intention.
There are two changes I looked at: (1) where IntelliTest asks the generator about what to use for attributing an expected exception (https://github.com/nunit/nunit-vs-testgenerator/blob/master/IntelliTest.NUnit/NUnitTestFramework.cs#L157). The change tells IntelliTest to not use attribution for expected exceptions. (2) The change at TryMarkExpectedException where an executing test is monitored to see whether it is throwing any expected exception.
Both of these look good.
@rprouse THat would be preferable, but this is outside the code we can change, afaik. We could possibly extend the base class itself, but we need to look into if that is enough. @pvlakshm : Comments? Can it be done? Further, this code lacks unit tests, and I am not sure at all how we can unit test it, too little knowledge about the framework it extends. Perhaps @pvlakshm can add something?
Fixed #6. Ready to be merged into master.