public async Task MarkAsAnsweredShouldNotMarkNotExistingEmailId(int emailId) { var context = ApplicationDbContextInMemoryFactory.InitializeContext(); var contactFormRepository = new EfRepository <ContactFormEntry>(context); var contactFormService = new ContactFormService(contactFormRepository); await contactFormService.MarkAsAnsweredAsync(emailId); var result = await contactFormService.MarkAsAnsweredAsync(emailId); Assert.False(result); }
public async Task MarkAsAnsweredShouldMarkCorrectlyNotAnsweredEmailId() { var context = ApplicationDbContextInMemoryFactory.InitializeContext(); var contactFormRepository = new EfRepository <ContactFormEntry>(context); var contactFormService = new ContactFormService(contactFormRepository); var newEmailId = await this.GetNewEmailId(contactFormService, contactFormRepository); var result = await contactFormService.MarkAsAnsweredAsync(newEmailId); Assert.True(result); }