public void ThrowArgumentExcpetion_WhenEmptyCollectionIsPassed() { //Arrange var sessionMock = new Mock <IUserSession>(); var serviceMock = new Mock <ICarService>(); var sut = new ViewCarDetailsCommand(sessionMock.Object, serviceMock.Object); var args = new string[0]; //Act && Assert Assert.ThrowsException <ArgumentException>(() => sut.Execute(args)); }
public void ThrowFormatExcpetion_WhenNonIntegerIdIsPassed() { //Arrange var sessionMock = new Mock <IUserSession>(); var serviceMock = new Mock <ICarService>(); var sut = new ViewCarDetailsCommand(sessionMock.Object, serviceMock.Object); var args = new string[1] { "a" }; //Act && Assert Assert.ThrowsException <FormatException>(() => sut.Execute(args)); }