Esempio n. 1
0
        public void IesCountsGetToIesContractCountsGetModel_MappingTest_Valid()
        {
            //1. setup data
            var source = IesContractTestDataHelper.CreateDummyCountsModel();

            //2. Exec
            var dest = MappingEngine.Map <IesContractCountsGetModel>(source);

            Assert.AreEqual(source.ContractTotalReferred, dest.ContractTotalReferred);
            Assert.AreEqual(source.ContractTotalServiced, dest.ContractTotalServiced);
            Assert.AreEqual(source.ContractTotalTransferred, dest.ContractTotalTransferred);
            Assert.AreEqual(source.GroupTotalReferred, dest.GroupTotalReferred);
        }
Esempio n. 2
0
        public void IesCountsGet_Valid()
        {
            //1. Setup data
            //a.request
            string contractId = "0204342H";

            //b.response
            var response = IesContractTestDataHelper.CreateDummyCountsModel();

            mockContractGetWcf.Setup(m => m.GetCounts(It.IsAny <GetCountsRequest>())).Returns(response);

            //2. exec
            var result = SystemUnderTest().GetCounts(contractId);

            //3. Verification
            //Verify More parameters
            Assert.IsTrue(result.ContractTotalReferred.Equals(response.ContractTotalReferred));

            //Verify behaviour
            mockContractGetWcf.Verify(m => m.GetCounts(It.Is <GetCountsRequest>(r => r.ContractId == contractId)), Times.Once());
        }