public void Execute_Less_Params_ThrowEx() { var fakeProvider = new FakeTeamProvider(); var listParams = new List <string>(); var sut = new CreateTeamCommand(listParams, fakeProvider); //Act & Assert Assert.ThrowsException <ArgumentException>(() => sut.Execute(), "Parameters count is not valid!"); }
public void ThrowWhen_NoOtherTeams() { //Arrange var fakeProvider = new FakeTeamProvider(); var list = new List <string>(); var sut = new CreateTeamCommand(list, fakeProvider); //Act & Assert Assert.ThrowsException <ArgumentException>(() => sut.Execute()); }
public void ReturnCorrectString() { //Arrange var fakeProvider = new FakeTeamProvider(); var listParams = new List <string>() { "Ducks" }; var sut = new CreateTeamCommand(listParams, fakeProvider); //Act var result = sut.Execute(); //Assert Assert.AreEqual(result, $"Created Team{Environment.NewLine}Ducks" + Commons.CreateTeamText()); }