Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
50 lines (41 sloc) 1.31 KB
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using SRPRefactor;
using Moq;
namespace ServiceStationTest
{
[TestClass]
public class GateUtilityTest
{
[TestMethod]
public void OpenGate_RightTime()
{
//hour > 9 return true;
var gateUtility = new GateUtility();
var result = gateUtility.OpenGate(55);
Assert.AreEqual(true, result);
}
[TestMethod]
public void Test_Hello_SendEmailMethod_GateUtility()
{
var gateUtility = new GateUtility();
string from = "Trung";
string to = "Huy";
string subject = "Hello";
string body = "Hello Huy";
var result = gateUtility.SendSignal(from, to, subject, body);
Assert.AreEqual("Trung says hello to Huy", result);
}
[TestMethod]
public void Test_Spam_SendEmailMethod_GateUtility()
{
var gateUtility = new GateUtility();
string from = "Trung";
string to = "Huy";
string subject = "This is test";
string body = "Hello Huy";
var result = gateUtility.SendSignal(from, to, subject, body);
Assert.AreEqual("This is spam signal", result);
}
}
}
You can’t perform that action at this time.