Hi,i have a code like this :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ClassLibraryMoq
{
public class Class1
{
public interface ISendr
{
string send();
}
public class smsSender : ISendr
{
public string send()
{
return "SMS send";
}
}
public class emailSender : ISendr
{
public String send()
{
return "Email send";
}
}
public class voiceSend : ISendr
{
public string send()
{
return "VOICE Send";
}
}
public class sender
{
public string send(ISendr obj)
{
return obj.send();
}
}
}
}
And implemented moq framework in visual studio ,to do the test,how would i comlete it to compile and run:
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using static ClassLibraryMoq.Class1;
namespace UnitTestProject
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
var mock = new Mock<ISendr>();
var objsender = new sender().send(mock.Object);
}
}
}
How to finish off the test with assert here? Thanks