public void ExecuteShouldThrowArgumentNullExceptionWhenParametersIsNull() { var factoryStub = new Mock <IBattleShipFactory>().Object; var engineStub = new Mock <IEngine>().Object; var cmd = new CreatePlayerCommand(factoryStub, engineStub); Assert.ThrowsException <ArgumentNullException>(() => cmd.Execute(null)); }
public void ExecuteShouldThrowArgumentExceptionWhenParametersIsEmpty() { var factoryStub = new Mock <IBattleShipFactory>().Object; var engineStub = new Mock <IEngine>().Object; var parameters = new List <string>(); var cmd = new CreatePlayerCommand(factoryStub, engineStub); Assert.ThrowsException <ArgumentException>(() => cmd.Execute(parameters)); }