public void GetValidWorkedHours(string employeeLocation)
        {
            var writeLine = new Action<string>(message => { });
            var readLine = new Func<string>(() => employeeLocation);
            var command = new GetEmployeeLocationCommand(writeLine, readLine);

            var result = command.Handle();

            var location = (Location)Enum.Parse(typeof(Location), employeeLocation);

            Assert.Equal(location, result);
        }
Example #2
0
        private static Location GetEmployeeLocation()
        {
            var command = new GetEmployeeLocationCommand(Console.WriteLine, Console.ReadLine);

            return(command.Handle());
        }