public void GetAllAgents() { TestHelper.InitDatabase(); GetReady(); var actRes = controller.Get(); var response = actRes.ExecuteAsync(CancellationToken.None).Result; Assert.IsNotNull(response.Content); }
public void TestGetAllAgentsNullObjectReturnsNoContentFail() { iAgentRepositoryMock.Setup(x => x.Get()) .Returns(Task.FromResult(new BaseResult <List <AgentResponse> >())); var result = agentController.Get().Result; Assert.That(result is NoContentResult); }