コード例 #1
0
        public void GetTopAgentsShouldReturnAgentList()
        {
            var response = reportsRepo.GetTopAgents();

            Assert.IsTrue(response.Success);
            Assert.AreEqual(3, response.Data.Count);
            Assert.AreEqual(4, response.Data[0].CompletedMissionCount);
        }
コード例 #2
0
        public void GetAgentsFromBadConnectionShouldReturnFail()
        {
            var emptyRepo = new ReportsADORepository("");
            var response  = emptyRepo.GetTopAgents();

            Assert.IsFalse(response.Success);
            Assert.Zero(response.Data.Count);
            Assert.AreEqual("Database empty", response.Message);
        }