Example #1
0
        public void AddEditContractServiceTypeTest()
        {
            ContractServiceTypeLogic target = new ContractServiceTypeLogic(Constants.ConnectionString);
            const long expected             = 0;
            long       actual = target.AddEditContractServiceType(null);

            Assert.AreEqual(expected, actual);
        }
Example #2
0
        public void AddEditContractServiceTypeIfNull()
        {
            _mockContractServiceTypeRepository = new Mock <IContractServiceTypeRepository>();
            _mockContractServiceTypeRepository.Setup(f => f.AddEditContractServiceType(It.IsAny <ContractServiceType>())).Returns(0);
            ContractServiceTypeLogic target = new ContractServiceTypeLogic(_mockContractServiceTypeRepository.Object);
            long actual = target.AddEditContractServiceType(null);

            Assert.AreEqual(0, actual);
        }
Example #3
0
        public void AddEditContractServiceTypeifNotNull()
        {
            _mockContractServiceTypeRepository = new Mock <IContractServiceTypeRepository>();
            _mockContractServiceTypeRepository.Setup(f => f.AddEditContractServiceType(It.IsAny <ContractServiceType>())).Returns(2);
            ContractServiceTypeLogic target = new ContractServiceTypeLogic(_mockContractServiceTypeRepository.Object);
            ContractServiceType      objAddEditContractServiceType = new ContractServiceType {
                ContractServiceTypeId = 1
            };
            long actual = target.AddEditContractServiceType(objAddEditContractServiceType);

            Assert.AreEqual(2, actual);
        }
 public long AddEditContractServiceType(ContractServiceType contractServiceTypes)
 {
     return(_serviceTypeDetailsLogic.AddEditContractServiceType(contractServiceTypes));
 }