public async Task WhenPostBodyCalledWithUndefined_ReturnHtml()
        {
            var controller = new RouteController(_compositeSettings, _sessionService, _dysacService, _dysacServiceSetings);

            controller.ControllerContext = new ControllerContext
            {
                HttpContext = new DefaultHttpContext()
            };

            var result = await controller.Body(Route.Undefined) as RedirectResult;

            result.Should().NotBeNull();
            result.Should().BeOfType <RedirectResult>();
            result.Url.Should().Be($"~/{CompositeViewModel.PageId.Route}?errors=true");
        }
        public async Task WhenPostBodyCalledWithJobsAndSkills_SetOriginToMatchSkills()
        {
            await _dysacService.InitiateDysac(new DfcUserSession()
            {
                CreatedDate  = DateTime.UtcNow,
                PartitionKey = "partitionkey",
                Salt         = "salt",
                SessionId    = "sessionid"
            });

            var controller = new RouteController(_compositeSettings, _sessionService, _dysacService, _dysacServiceSetings);

            controller.ControllerContext = new ControllerContext
            {
                HttpContext = new DefaultHttpContext()
            };
            await controller.Body(Route.JobsAndSkills);

            await _dysacService.Received().InitiateDysac(Arg.Is <DfcUserSession>(x => x.Origin == Origin.MatchSkills));
        }
        public async Task WhenPostBodyCalledWithJobsAndSkills_ReturnHtml()
        {
            await _dysacService.InitiateDysac(new DfcUserSession()
            {
                CreatedDate  = DateTime.UtcNow,
                PartitionKey = "partitionkey",
                Salt         = "salt",
                SessionId    = "sessionid"
            });

            var controller = new RouteController(_compositeSettings, _sessionService, _dysacService, _dysacServiceSetings);

            controller.ControllerContext = new ControllerContext
            {
                HttpContext = new DefaultHttpContext()
            };

            var result = await controller.Body(Route.JobsAndSkills) as RedirectResult;

            result.Should().NotBeNull();
            result.Should().BeOfType <RedirectResult>();
            result.Url.Should().Be("http://dysacurl");
        }