Inside my test I'm having mock object which should test expected NotImplementedException thrown from MyService.Create method
I'm struggle in this part
var hotelServiceMock = new Mock<HotelService>();
hotelServiceMock.Setup(x=>x.Create(It.IsAny<HotelToCreateDTO>(), true))
.Throws(() => NotImplementedException());
I was think to use Returns instead of thrown (seen somewhere on net for some expected value, not exception) but on intellisense I'm getting only
Aucun commentaire:
Enregistrer un commentaire