public void SetCurrentWeek(LoginResponse response) { cbWeeks.DataSource = new List<string> { response.TimeCard.CurrentWeek }; cbDayOfTheWeek.DataSource = response.TimeCard.WeekDays; cbEarningsCode.DataSource = response.TimeCard.EarningCodes; cbContractLine.DataSource = response.TimeCard.ContractLines; cbContractNo.DataSource = response.TimeCard.ContractNumbers; cbActivityId.DataSource = response.TimeCard.ActivityIDs; cbProjectId.DataSource = response.TimeCard.ProjectIDs; }
private void SetupSuccessfulLoginWithResponse(LoginResponse expectedResponse) { _page.Setup(p => p.Login(It.IsAny<string>(), It.IsAny<string>())).Returns(true); _page.Setup(p => p.LastErrorMessage).Returns(""); var expectedTimeCard = new TimeCard { CurrentWeek = expectedResponse.TimeCard.CurrentWeek, WeekDays = expectedResponse.TimeCard.WeekDays, EarningCodes = expectedResponse.TimeCard.EarningCodes, ContractLines = expectedResponse.TimeCard.ContractLines, ContractNumbers = expectedResponse.TimeCard.ContractNumbers, ActivityIDs = expectedResponse.TimeCard.ActivityIDs, ProjectIDs = expectedResponse.TimeCard.ProjectIDs }; _page.Setup(p => p.GetTimeCard()).Returns(expectedTimeCard); }