< Summary

Class:MUNity.Services.MailService
Assembly:MUNity.Services
File(s):C:\Users\aeuke\source\repos\PeerConradi\munity\src\MUNityServices\Services\MailService.cs
Covered lines:0
Uncovered lines:10
Coverable lines:10
Total lines:30
Line coverage:0% (0 of 10)
Covered branches:0
Total branches:0
Covered methods:0
Total methods:2
Method coverage:0% (0 of 2)

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
SendEmailAsync(...)100%10%
SendMail(...)100%10%

File(s)

C:\Users\aeuke\source\repos\PeerConradi\munity\src\MUNityServices\Services\MailService.cs

#LineLine coverage
 1using Microsoft.AspNetCore.Identity.UI.Services;
 2using System;
 3using System.Collections.Generic;
 4using System.Linq;
 5using System.Net;
 6using System.Net.Mail;
 7using System.Text;
 8using System.Threading.Tasks;
 9
 10namespace MUNity.Services
 11{
 12    public class MailService : IMailService
 13    {
 14        public Task SendEmailAsync(string email, string subject, string htmlMessage)
 015        {
 016            throw new NotImplementedException();
 17        }
 18
 19        public void SendMail(string target, string title, string content)
 020        {
 021            var client = new SmtpClient("smtp.mailtrap.io", 2525)
 022            {
 023                Credentials = new NetworkCredential("056044a17ce7ee", "b8506b064d1b43"),
 024                EnableSsl = true
 025            };
 026            client.Send("no-reply@munity.org", target, title, content);
 027        }
 28
 29    }
 30}

Methods/Properties

SendEmailAsync(...)
SendMail(...)