Exemplo n.º 1
0
        public void CorrectNipsPrawna()
        {
            Dictionary <string, InputCompany>    correctCompanies = CompanyGenerator.GetCorrectCompanies();
            Dictionary <string, BiRVerifyResult> verResults       = _verifier.AreCompaniesActive(correctCompanies.Values.ToList <InputCompany>());

            Assert.AreEqual(correctCompanies.Count, verResults.Count);
            Assert.AreEqual(0, correctCompanies.Keys.Except(verResults.Keys).Count());


            foreach (var result in verResults)
            {
                Assert.AreEqual(BiRVerifyStatus.IsActive, result.Value.BiRVerifyStatus);
            }
        }
Exemplo n.º 2
0
        private void VerifyCompaniesInBiRSystem(SearchSettings searchSettings, IProgress <string> progress)
        {
            DateTime startTime = DateTime.Now;

            progress.Report(string.Format("{0}: Rozpoczęto sprawdzenie w systemie BiR (REGON).\n", DateTime.Now.ToLongTimeString()));

            BiRVerifier biRVerifier = new BiRVerifier();

            _verificationResult.BiRSystemVerResult = biRVerifier.AreCompaniesActive(_companiesReadFromFile);
            biRVerifier.Finish();

            progress.Report(string.Format("{0}: Zakończono sprawdzanie w systemie BiR (REGON). Czas trwania operacji: {1}s.\n", DateTime.Now.ToLongTimeString(), Math.Round((DateTime.Now - startTime).TotalSeconds, 0)));
        }