public void ReceiveInputedValue_Must_Return_1() { //Arrange var useCaseStarshipResupply = new StarshipResupplyRequired(); var console = new TestConsoleVirtual(); //Act var inputedValue = useCaseStarshipResupply.ReceiveInputedValue(console); // Assert Assert.Equal(1, inputedValue); }
static async Task Main(string[] args) { try { var httpClient = new HttpClient(); var service = new StarWarsApiService(httpClient); var consoleVirtual = new ConsoleVirtual(); var useCaseStarshipResupply = new StarshipResupplyRequired(); var inputedDistanceMGLT = useCaseStarshipResupply.ReceiveInputedValue(consoleVirtual); Console.WriteLine("Please wait, loading..."); var listOfStarships = await useCaseStarshipResupply.LoadStarships(service); useCaseStarshipResupply.CalculateResupplyRequired(listOfStarships, inputedDistanceMGLT, consoleVirtual); } catch (Exception ex) { Console.WriteLine($"Error: {ex.Message}"); } }