Exemple #1
0
        public void shouldReturnInvalidLicense()
        {
            IDbSet <license> licenseDbSet = getLicenseDbSet();
            IDbSet <company> companyDbSet = getCompanyDbSet();

            IRepositoryContext repositoryContext = Substitute.For <IRepositoryContext>();

            repositoryContext.Licenses.Returns(licenseDbSet);
            repositoryContext.Companies.Returns(companyDbSet);

            string nip           = "333 22 22 222";
            var    licenseEngine = new LicenseEngine(repositoryContext);


            bool isValidLicense = licenseEngine.CheckValidityLicenseByNip(nip);


            Assert.IsFalse(isValidLicense);;
        }
        public bool CheckValidityLicenseByNip(string nip)
        {
            var licenseEngine = new LicenseEngine();

            return(licenseEngine.CheckValidityLicenseByNip(nip));
        }