You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
499 B
27 lines
499 B
using Model;
|
|
|
|
public class MockEmailService : IEmailService
|
|
{
|
|
public MockEmailService(bool sendEmail)
|
|
{
|
|
SendEmail = sendEmail;
|
|
}
|
|
|
|
public string? EmailSentTo {get; private set; }
|
|
|
|
private bool SendEmail {get; set;}
|
|
|
|
public Task AskConfirmation(Nounours nounours)
|
|
{
|
|
if(SendEmail)
|
|
{
|
|
EmailSentTo = nounours.Email;
|
|
return Task.CompletedTask;
|
|
}
|
|
else
|
|
{
|
|
throw new Exception();
|
|
}
|
|
}
|
|
}
|