private void GetRequests()
        {
            short portfolio = 1;

            if (IncludePortfolio2)
            {
                portfolio = 2;
            }
            if (IncludePortfolio3)
            {
                portfolio = 3;
            }
            if (IncludePortfolio4)
            {
                portfolio = 4;
            }

            var param = new StoreYbAnalyticReq()
            {
                RunDate     = SelectedRequestGroup.RunDate,
                ValDate     = SelectedRequestGroup.ValDate,
                Slot        = SelectedRequestGroup.Slot,
                PortfolioId = portfolio
            };

            Requests = new ObservableCollection <StoreYbAnalyticReq>(AvDataContext.GetRequests(param));
            OnPropertyChanged("Requests");
        }
Пример #2
0
        public void Dc_ReturnsRequestsForRequestGroup()
        {
            // Arrange
            var requestGroup = new StoreYbAnalyticReq()
            {
                RunDate = new DateTime(2018, 2, 23, 0, 30, 5), ValDate = new DateTime(2018, 2, 21), Slot = 2, PortfolioId = 1,
            };

            // Act
            var requests = AvDataContext.GetRequests(requestGroup);

            // Assert
            Assert.IsType <List <StoreYbAnalyticReq> >(requests);
            Assert.NotEmpty(requests);
            Assert.True(requests.Count > 0);
        }