예제 #1
0
        public void GetAllAgents()
        {
            TestHelper.InitDatabase();
            GetReady();
            var actRes   = controller.Get();
            var response = actRes.ExecuteAsync(CancellationToken.None).Result;

            Assert.IsNotNull(response.Content);
        }
예제 #2
0
        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);
        }