public void IsTheProductNameAlreadyExist_DontExist()
        {
            LoanProductManager loanProductManager = (LoanProductManager)container["LoanProductManager"];
            bool exist = loanProductManager.IsThisProductNameAlreadyExist("DDDD");

            Assert.IsFalse(exist);
        }
        public void IsTheProductNameAlreadyExist_ReallyExist()
        {
            LoanProductManager loanProductManager = (LoanProductManager)container["LoanProductManager"];
            bool exist = loanProductManager.IsThisProductNameAlreadyExist("Product1");

            Assert.IsTrue(exist);
        }
Exemple #3
0
        private void CheckValueForPackageName(string pName)
        {
            if (string.IsNullOrEmpty(pName))
            {
                throw new OpenCbsPackageSaveException(OpenCbsPackageSaveExceptionEnum.NameIsNull);
            }

            if (_productManager.IsThisProductNameAlreadyExist(pName))
            {
                throw new OpenCbsPackageSaveException(OpenCbsPackageSaveExceptionEnum.NameAlreadyExist);
            }
        }