public void EvaluateIfTheString_IsADate() { // ARRANGE - Preparación String date = "3/9/2008"; Boolean result; // ACT - EJECUCION result = HpVarious.IsDate(date); // ASSERT - COMPROBACION Assert.IsTrue(result); }
public static int PrintRoomMenu() { ColorAlternatorFactory alternatorFactory = new ColorAlternatorFactory(); ColorAlternator alternator = alternatorFactory.GetAlternator(1, Color.Aqua, Color.Aquamarine); Console.Clear(); HpVarious.WriteArt(APP_NAME); WriteArea("AREA HABITACIONES\n"); Console.WriteLineAlternating("\t(1) REGISTRAR HABITACION (INCLUIR NUEVA HABITACION)", alternator); Console.WriteLineAlternating("\t(2) CONSULTAR HABITACIONES", alternator); Console.WriteLineAlternating("\t(3) VOLVER", alternator); Console.Write("\nOpcion: "); return(Convert.ToInt32(Console.ReadLine())); }
public static int PrintClientMenu() { ColorAlternatorFactory alternatorFactory = new ColorAlternatorFactory(); ColorAlternator alternator = alternatorFactory.GetAlternator(1, Color.Aqua, Color.Aquamarine); Console.Clear(); HpVarious.WriteArt(APP_NAME); WriteArea("AREA CLIENTES\n"); Console.WriteLineAlternating("\t(1) REGISTRAR CLIENTE (NUEVO CLIENTE)", alternator); Console.WriteLineAlternating("\t(2) ACTUALIZAR CLIENTE", alternator); Console.WriteLineAlternating("\t(3) CONSULTAR CLIENTES", alternator); Console.WriteLineAlternating("\t(4) VOLVER", alternator); Console.Write("\nOpcion: "); return(Convert.ToInt32(Console.ReadLine())); }
public static int PrintMainMenu() { ColorAlternatorFactory alternatorFactory = new ColorAlternatorFactory(); ColorAlternator alternator = alternatorFactory.GetAlternator(1, Color.Aqua, Color.Aquamarine); Console.Clear(); //Console.WriteLine("SISTEMA RESERVA DE HOTEL BBKBOOTCAMP 2020 (6ta Edición)\n"); HpVarious.WriteArt(APP_NAME); Console.WriteLineAlternating("\t(1) CLIENTES", alternator); Console.WriteLineAlternating("\t(2) HABITACIONES", alternator); Console.WriteLineAlternating("\t(3) RESERVACIONES", alternator); Console.WriteLineAlternating("\t(4) SALIR", alternator); Console.Write("\nOpcion: "); return(Convert.ToInt32(Console.ReadLine())); }
public static int PrintBookingLowLevelMenu() { ColorAlternatorFactory alternatorFactory = new ColorAlternatorFactory(); ColorAlternator alternator = alternatorFactory.GetAlternator(1, Color.Aqua, Color.Aquamarine); Console.Clear(); HpVarious.WriteArt(APP_NAME); WriteArea("AREA RESERVACIONES -> MODIFICAR RESERVACION EXISTENTE\n"); Console.WriteLineAlternating("\t(1) MODIFICAR CHECK_IN (FECHA INICIAL)", alternator); Console.WriteLineAlternating("\t(2) MODIFICAR CHECK_OUT (FECHA FINAL)", alternator); Console.WriteLineAlternating("\t(3) MODIFICAR AMBAS CHECK_IN (FECHA INICIAL) Y CHECK_OUT (FECHA FINAL)", alternator); Console.WriteLineAlternating("\t(4) VOLVER", alternator); Console.Write("\nOpcion: "); return(Convert.ToInt32(Console.ReadLine())); }
public static string GetDNIFromUser(string areaMenu) { string strDNI; Console.Clear(); HpVarious.WriteArt(APP_NAME); do { WriteArea(areaMenu); Console.Write("DNI: "); strDNI = Console.ReadLine().ToUpper(); if (strDNI != "0" && strDNI.Length == 9) { return(strDNI); } else { Console.WriteLine("ERROR -> DNI debe ser igual a 9 caracteres y diferente de 0", Color.Red); } } while (true); }