Пример #1
0
        public async Task <IViewComponentResult> InvokeAsync()
        {
            if (_matchService.IsMatched())
            {
                VeteranLawyerMatch match = await _matchService.GetMatchAsync();

                if (!match.IsDateTimeApproved)
                {
                    match.Lawyer.Availability = _matchService.GetLawyerAvailability(match.LawyerApplicationUserId);
                    return(View("MatchStage1", match));
                }
                else
                {
                    return(View("MatchStage2", match));
                }
            }
            else if (_matchService.IsInQueue())
            {
                VeteranQueue queue = _matchService.GetQueueItem();
                return(View("WaitingMatch", queue));
            }
            else if (!_matchService.HasCompletedForm())
            {
                return(View("NoForm"));
            }
            else
            {
                return(View()); // "Default"
            }
        }
        public void VeteranApplicationUserId_TestingGetter_ReturnString()
        {
            // Arrange
            VeteranQueue n = new VeteranQueue();

            // Act
            n.VeteranApplicationUserId = "Veteran";

            // Assert
            Assert.Equal("Veteran", n.VeteranApplicationUserId);
        }