To me this is a totally irrelevant unit-test and I don't understand why someone would spent time writing it, since there is very little value to gain from it. I would know perfectly well if this controller returned the wanted type by executing the method in a browser. Really, do you believe a test is needed for this and why ?
public class ConstituencyControllerTests
{
private ConstituencyController _constituencyController;
private Mock<IConstituencyService> _IConstituencyServiceMock;
public ConstituencyControllerTests() {
_IConstituencyServiceMock = new Mock<IConstituencyService>();
}
[Test]
public async Task I_Check_For_Return_Type_And_Result() {
_constituencyController = new ConstituencyController( _IConstituencyServiceMock.Object );
var result = await _constituencyController.Get();
var content = ( (dynamic)result ).Content;
Assert.IsEmpty( content );
Assert.IsInstanceOf( typeof( System.Web.Http.Results.OkNegotiatedContentResult<IEnumerable<ListOfConstituencies>> ), result );
_IConstituencyServiceMock.Verify( x => x.ListOfConstituencies(), Times.Once() );
}
}