Example #1
0
        public void CheckNameIfContractServiceTypeIsNull()
        {
            //Arrange
            _mockContractServiceTypeRepository = new Mock <IContractServiceTypeRepository>();
            _mockContractServiceTypeRepository.Setup(x => x.IsContractServiceTypeNameExit(null))
            .Returns(false);
            ContractServiceTypeLogic target = new ContractServiceTypeLogic(_mockContractServiceTypeRepository.Object);
            const bool expected             = false;
            //Act
            bool actual = target.IsContractServiceTypeNameExit(null);

            // Assert
            Assert.AreEqual(expected, actual);
        }
Example #2
0
        public void IfContractServiceTypeNameIsUnique()
        {
            //Arrange
            _mockContractServiceTypeRepository = new Mock <IContractServiceTypeRepository>();
            _mockContractServiceTypeRepository.Setup(x => x.IsContractServiceTypeNameExit(It.IsAny <ContractServiceType>()))
            .Returns(true);
            ContractServiceTypeLogic target = new ContractServiceTypeLogic(_mockContractServiceTypeRepository.Object);
            const bool expected             = true;

            //Act
            bool actual = target.IsContractServiceTypeNameExit(new ContractServiceType());

            // Assert
            Assert.AreEqual(expected, actual);
        }
 public bool IsContractServiceTypeNameExit(ContractServiceType contractServiceTypes)
 {
     return(_serviceTypeDetailsLogic.IsContractServiceTypeNameExit(contractServiceTypes));
 }