public async Task GetSpaceTraveller_InvalidName_Expect_Exception_Message() { var swApi = new SwApi(); var result = await swApi.GetSpaceTraveller("Luko skywalker"); Assert.NotNull("You are not famous and can't access this spacepark."); }
public async Task GetSpaceTraveller_EmptyInput_Expect_Exception_Message() { var swApi = new SwApi(); var result = await swApi.GetSpaceTraveller(""); Assert.NotNull("You have entered an invalid name, please enter your full name."); }
public async Task ChooseStarShip_NoneAvailable_Expect_Null_Return() { var swApi = new SwApi(); var testPerson = await swApi.GetSpaceTraveller("C-3PO"); var result = await swApi.ChooseStarShip(testPerson); Assert.Null(result); }
public async Task GetSpaceTraveller_Expect_Starships() { var swApi = new SwApi(); var listOfShips = new List <string> { "http://swapi.dev/api/starships/12/", "http://swapi.dev/api/starships/22/" }; var result = await swApi.GetSpaceTraveller("Luke skywalker"); Assert.Equal(listOfShips, result.StarShips); Assert.NotNull(result); }