public void MySchedulePage_UsserAndDate_ScheduleForUser(string login, string password, string positions, string date, int rows) { LoginPageObject loginPage = new LoginPageObject(); MySchedPageObject mSchedPage = loginPage.Login(login, password); mSchedPage.SetDate(date); int width = mSchedPage.GetTableWidth(); int height = mSchedPage.GetTableHeight(); String[,] table = new String[height + 1, width]; for (int i = 0; i < height + 1; i++) { for (int j = 0; j < width; j++) { table[i, j] = mSchedPage.GetCellContent(i - 1, j); } } positions = "(" + positions.Replace(",", ")|(") + ".?)*"; Assert.That(width == 2); Assert.That(height == rows); for (int i = 0; i < height + 1; i++) { if (i == 0) { StringAssert.IsMatch("Godzina", table[0, 0]); StringAssert.IsMatch("Stanowiska", table[0, 1]); } else { StringAssert.IsMatch("[0-2][0-9]:[0-6][0-9] - [0-2][0-9]:[0-6][0-9]", table[i, 0]); StringAssert.IsMatch(positions, table[i, 1]); } } }