private void DisplaySpaces(int venueSelection) { List <Venue> venues = venueDAO.ListVenues(); List <Space> spaces = spaceDAO.GetSpecificVenueSpace(venues[venueSelection - 1].Id); Console.WriteLine("\t" + venues[venueSelection - 1].Name + "\n\n" + "\tName\t\t\t\t\tOpen\t\tClose\t\tDaily Rate\tMax.Occupancy\n"); foreach (Space tempSpace in spaces) { Console.WriteLine("#" + tempSpace.Id + "\t" + tempSpace.Name.PadRight(40) + CultureInfo.CurrentCulture.DateTimeFormat.GetAbbreviatedMonthName(tempSpace.OpenFrom) + "\t\t" + CultureInfo.CurrentCulture.DateTimeFormat.GetAbbreviatedMonthName(tempSpace.OpenTo) + "\t\t$" + Math.Round(tempSpace.DailyRate, 2) + " \t\t" + tempSpace.MaxOccupancy); } }
public void GetSpecificVenueSpaceTest() { SpaceSqlDAO spaceSqlDAO = new SpaceSqlDAO(connectionString); List <Space> TestSpaceList = spaceSqlDAO.GetSpecificVenueSpace(7); bool result = false; foreach (Space res in TestSpaceList) { if (res.Name == "The Royal Room") { result = true; } } Assert.IsTrue(result); }