2022-11-02 22:09:33 +00:00
|
|
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
2019-12-27 18:57:17 +00:00
|
|
|
|
using OmniLinkBridge;
|
2022-11-02 22:09:33 +00:00
|
|
|
|
using OmniLinkBridge.Notifications;
|
2019-12-27 18:57:17 +00:00
|
|
|
|
using System.Net.Mail;
|
2018-10-13 21:28:47 +00:00
|
|
|
|
|
|
|
|
|
namespace OmniLinkBridgeTest
|
|
|
|
|
{
|
|
|
|
|
[TestClass]
|
|
|
|
|
public class NotificationTest
|
|
|
|
|
{
|
|
|
|
|
[TestMethod]
|
|
|
|
|
public void SendNotification()
|
|
|
|
|
{
|
2019-12-27 18:57:17 +00:00
|
|
|
|
// This is an integration test
|
|
|
|
|
Global.mail_server = "localhost";
|
|
|
|
|
Global.mail_tls = false;
|
|
|
|
|
Global.mail_port = 25;
|
|
|
|
|
Global.mail_from = new MailAddress("OmniLinkBridge@localhost");
|
|
|
|
|
Global.mail_to = new MailAddress[]
|
|
|
|
|
{
|
|
|
|
|
new MailAddress("mailbox@localhost")
|
|
|
|
|
};
|
|
|
|
|
|
2018-10-13 21:28:47 +00:00
|
|
|
|
Notification.Notify("Title", "Description");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|