Код: Выделить всё
var exception = await Assert.ThrowsAsync(() => _controller.Post(categoryNull));
Подробнее здесь: https://stackoverflow.com/questions/790 ... works-fine
Код: Выделить всё
var exception = await Assert.ThrowsAsync(() => _controller.Post(categoryNull));