I am attempting to assert that an object being returned by a method call is of the type List, so using xUnit I have tried the following:
List
The first argument for Assert.IsType should be the object itself not its type, the following should not throw:
var expected = typeof(List<MyClass>); var actual = Method(); Assert.IsType<List<MyClass>>(actual); Assert.IsType(expected, actual);