Example #1
0
        public void CorrectPhisicalGetCompanyTest()
        {
            BiRCompany birCompany1 = XMLResponseGenerator.CorrectFizycznaCompany1;
            BiRCompany birCompany2 = BiRResponseXMLParser.GetCompanyFromDaneSzukajPodmiotyResponse(XMLResponseGenerator.CorrectFizicznaCompany1DaneRaportResponse);

            Assert.AreEqual(birCompany1.Regon, birCompany2.Regon);
            Assert.AreEqual(birCompany1.NIP, birCompany2.NIP);
            Assert.AreEqual(birCompany1.NipStatus, birCompany2.NipStatus);
            Assert.AreEqual(birCompany1.Name, birCompany2.Name);
            Assert.AreEqual(birCompany1.Wojewodztwo, birCompany2.Wojewodztwo);
            Assert.AreEqual(birCompany1.Powiat, birCompany2.Powiat);
            Assert.AreEqual(birCompany1.Gmina, birCompany2.Gmina);
            Assert.AreEqual(birCompany1.Town, birCompany2.Town);
            Assert.AreEqual(birCompany1.PostalCode, birCompany2.PostalCode);
            Assert.AreEqual(birCompany1.Street, birCompany2.Street);
            Assert.AreEqual(birCompany1.BuildingNumber, birCompany2.BuildingNumber);
            Assert.AreEqual(birCompany1.LocalNumber, birCompany2.LocalNumber);
            Assert.AreEqual(birCompany1.CompanyType, birCompany2.CompanyType);
            Assert.AreEqual(birCompany1.SilosID, birCompany2.SilosID);
        }
Example #2
0
        public void CorrectGetCompanyDetailedReportFizycznaTest()
        {
            BiRCompany birCompany1 = XMLResponseGenerator.FullCorrectPhisicalCompany1;
            BiRCompany birCompany2 = XMLResponseGenerator.FullCorrectPhisicalCompany1;

            BiRResponseXMLParser.AddDaneFizycznaCedig(ref birCompany2, XMLResponseGenerator.CorrectFizycznaCompany1DetailReportResponse);

            Assert.AreEqual(birCompany1.NameShort, birCompany2.NameShort);
            Assert.AreEqual(birCompany1.WpisDoRejestruEwidencjiDate, birCompany2.WpisDoRejestruEwidencjiDate);
            Assert.AreEqual(birCompany1.CreationDate, birCompany2.CreationDate);
            Assert.AreEqual(birCompany1.StartRunDate, birCompany2.StartRunDate);
            Assert.AreEqual(birCompany1.ZaistnieniaZmianyDate, birCompany2.ZaistnieniaZmianyDate);
            Assert.AreEqual(birCompany1.ZakonczeniaDzialalnosciDate, birCompany2.ZakonczeniaDzialalnosciDate);
            Assert.AreEqual(birCompany1.SkresleniaRegonDate, birCompany2.SkresleniaRegonDate);
            Assert.AreEqual(birCompany1.OrzeczenieOUpadlosciDate, birCompany2.OrzeczenieOUpadlosciDate);
            Assert.AreEqual(birCompany1.ZakonczeniePostepowaniaUpadlosiowegoDate, birCompany2.ZakonczeniePostepowaniaUpadlosiowegoDate);
            Assert.AreEqual(birCompany1.NumerTelefonu, birCompany2.NumerTelefonu);
            Assert.AreEqual(birCompany1.NumerFaksu, birCompany2.NumerFaksu);
            Assert.AreEqual(birCompany1.Gmina, birCompany2.Gmina);
            Assert.AreEqual(birCompany1.RodzajRejestruEwidencji, birCompany2.RodzajRejestruEwidencji);
            Assert.AreEqual(birCompany1.NumWRejestrzeEwidencji, birCompany2.NumWRejestrzeEwidencji);
            Assert.AreEqual(birCompany1.OrganZalozycielski, birCompany2.OrganZalozycielski);
            Assert.AreEqual(birCompany1.OrganRejestrowy, birCompany2.OrganRejestrowy);
            Assert.AreEqual(birCompany1.FormaWlasnosci, birCompany2.FormaWlasnosci);
            Assert.AreEqual(birCompany1.FormaFinansowania, birCompany2.FormaFinansowania);
            Assert.AreEqual(birCompany1.SzczegolnaFormaPrawna, birCompany2.SzczegolnaFormaPrawna);
            Assert.AreEqual(birCompany1.PodstawowaFormaPrawna, birCompany2.PodstawowaFormaPrawna);
            Assert.AreEqual(birCompany1.RegonDate, birCompany2.RegonDate);
            Assert.AreEqual(birCompany1.ZawieszeniaDate, birCompany2.ZawieszeniaDate);
            Assert.AreEqual(birCompany1.WziowieniaDate, birCompany2.WziowieniaDate);
            Assert.AreEqual(birCompany1.SiedzibaNietypoweMiejsceLokalizacji, birCompany2.SiedzibaNietypoweMiejsceLokalizacji);
            Assert.AreEqual(birCompany1.Email, birCompany2.Email);
            Assert.AreEqual(birCompany1.WWW, birCompany2.WWW);
            Assert.AreEqual(birCompany1.NumerFaksu, birCompany2.NumerFaksu);
            Assert.AreEqual(birCompany1.NumerTelefonu, birCompany2.NumerTelefonu);
            Assert.AreEqual(birCompany1.NiePodjetoDzialanosci, birCompany2.NiePodjetoDzialanosci);
            Assert.AreEqual(birCompany1.SkresleniaZRejestruEwidencji, birCompany2.SkresleniaZRejestruEwidencji);
        }
Example #3
0
 public void EmptyGetCompanyTest()
 {
     Assert.Throws <ArgumentOutOfRangeException>(() => BiRResponseXMLParser.GetCompanyFromDaneSzukajPodmiotyResponse(string.Empty));
 }
 public void CorrectCompanyContainsErrorMsg()
 {
     Assert.IsFalse(BiRResponseXMLParser.ContainsError(XMLResponseGenerator.CorrectPrawnaCompany1DaneRaportResponse));
 }
 public void Error4ContainsErrorMsg()
 {
     Assert.IsTrue(BiRResponseXMLParser.ContainsError(XMLResponseGenerator.Error4Response));
 }
 public void NullContainsErrorMsg()
 {
     Assert.Throws <ArgumentNullException>(() => BiRResponseXMLParser.ContainsError(null));
 }
 public void EmptyContainsErrorMsg()
 {
     Assert.Throws <ArgumentNullException>(() => BiRResponseXMLParser.ContainsError(string.Empty));
 }
 public void CorrectCompanyResponseGetErrorMsgTest()
 {
     Assert.Throws <ArgumentOutOfRangeException>(() => BiRResponseXMLParser.GetErrorMsg(XMLResponseGenerator.CorrectPrawnaCompany1DaneRaportResponse));
 }
 public void Error4ResponseGetErrorMsgTest()
 {
     Assert.AreEqual(XMLResponseGenerator.Error4ErrMessage, BiRResponseXMLParser.GetErrorMsg(XMLResponseGenerator.Error4Response));
 }
Example #10
0
 public void NullGetErrorMsg()
 {
     Assert.Throws <ArgumentNullException>(() => BiRResponseXMLParser.GetErrorMsg(null));
 }
Example #11
0
 public void EmptyGetErrorMsgTest()
 {
     Assert.Throws <ArgumentNullException>(() => BiRResponseXMLParser.GetErrorMsg(string.Empty));
 }
Example #12
0
 public void NonEmptyCorrectResponseIsEmptyResponseTest()
 {
     Assert.IsFalse(BiRResponseXMLParser.IsResponseEmpty(XMLResponseGenerator.CorrectPrawnaCompany1DaneRaportResponse));
 }
Example #13
0
 public void NonEmptyErrorResponseIsEmptyResponseTest()
 {
     Assert.IsFalse(BiRResponseXMLParser.IsResponseEmpty(XMLResponseGenerator.Error4Response));
 }
Example #14
0
 public void EmptyResponseIsEmptyResposeTest()
 {
     Assert.IsTrue(BiRResponseXMLParser.IsResponseEmpty("<root>\r\n</root>"));
 }
Example #15
0
 public void NullIsEmptyResposeTest()
 {
     Assert.Throws <ArgumentNullException>(() => BiRResponseXMLParser.IsResponseEmpty(null));
 }
Example #16
0
 public void EmptyIsEmptyResposeTest()
 {
     Assert.IsTrue(BiRResponseXMLParser.IsResponseEmpty(string.Empty));
 }