public void ShouldNotHaveAnyDomainEvents() { var userId = Name(); var submission = Submission.For(userId) as IHaveDomainEvents; submission.DomainEvents.Should().BeEmpty(); }
public Task <Guid> Handle(SubmitForApproval request, CancellationToken cancellationToken) { var submission = Submission.For(request.UserId); submissions.Add(submission); return(Task.FromResult(submission.SubmissionId)); }
public void ShouldCreatePendingSubmission() { var submission = Submission.For(Name()); submission.Response.Should().BeNull(because: "the submission does not have a response"); submission.Pending.Should().Be(true, because: "the submission does not have a response"); submission.Rejected.Should().Be(false, because: "the submission does not have a response"); submission.Approved.Should().Be(false, because: "the submission does not have a response"); }
public void ShouldHaveBeenCreatedRecently() { var userId = Name(); Submission.For(userId).Created.Should().BeCloseTo(DateTimeOffset.Now); }
public void ShouldHaveTheGivenUserId() { var userId = Name(); Submission.For(userId).UserId.Should().Be(userId); }
public void Setup() { // Arrange submission = Submission.For(Name()); }