Example #1
0
        public async Task ResultShouldBeSuccess()
        {
            var search = new JobSearch();
            var app    = new JobApplication(search, "Microsoft", "Developer");

            await AddAsync(app);

            var command = new SubmitApplicationCommand {
                ApplicationId = app.Id, SubmittedOn = DateTime.Now
            };

            var response = await SendAsync(command);

            response.IsSuccess.ShouldBeTrue();
        }
Example #2
0
        public async Task ShouldSubmit()
        {
            var search = new JobSearch();
            var app    = new JobApplication(search, "Microsoft", "Developer");

            await AddAsync(app);

            var command = new SubmitApplicationCommand {
                ApplicationId = app.Id, SubmittedOn = DateTime.Now
            };

            await SendAsync(command);

            var submittedApp = await FindAsync <JobApplication>(app.Id, collectionIncludes : new string[] { nameof(JobApplication.Transitions) });

            submittedApp.CurrentStatus.ShouldBe(ApplicationStatuses.SUBMITTED);
        }