示例#1
0
        public void IsModelValid_Test_1()
        {
            UpdateCompanyDetailModel updatedCompanyDetail = new UpdateCompanyDetailModel
            {
                CompanyName       = "Hooli",
                NumberOfEmployees = 5,
                WebSite           = "hooli.xyz"
            };
            var result = _companyUpdateModelValidation.IsModelValid(updatedCompanyDetail);

            Assert.IsTrue(result);
        }
示例#2
0
        public bool IsValid(string catalogueId, int companyId, UpdateCompanyDetailModel updatedCompanyDetail)
        {
            bool isAllValid   = false;
            bool isModelValid = _companyUpdateModelValidation.IsModelValid(updatedCompanyDetail);

            if (!string.IsNullOrWhiteSpace(catalogueId) && companyId > 0 && isModelValid)
            {
                isAllValid = true;
            }
            return(isAllValid);
        }