Exemple #1
0
        public void AdditionalInfoParser_ParseInformation_FieldCode32And33_ShouldParseNameOfPayer()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?32Name of ?33payer");

            Assert.AreEqual("Name of payer", information.NameOfPayer);
        }
Exemple #2
0
        public void AdditionalInfoParser_ParseInformation_FieldCode20ABWA_MultiPart_ShouldParsePayersReferenceParty()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?20ABWA+Payers reference?21 party");

            Assert.AreEqual("Payers reference party", information.PayersReferenceParty);
        }
Exemple #3
0
        public void AdditionalInfoParser_ParseInformation_FieldCode20ABWE_MultiPart_ContainsSeparator_ShouldParseCompleteCreditorsReferenceParty()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?20ABWE+Creditors?reference?21?party");

            Assert.AreEqual("Creditors?reference?party", information.CreditorsReferenceParty);
        }
Exemple #4
0
        public void AdditionalInfoParser_ParseInformation_FieldCode20SVWZ_ShouldParseSepaRemittanceInformation()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?20SVWZ+Sepa remittance information");

            Assert.AreEqual("Sepa remittance information", information.SepaRemittanceInformation);
        }
Exemple #5
0
        public void AdditionalInfoParser_ParseInformation_FieldCode20SVWZ_MultiPart_ShouldAddNewlineForEachNewField()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?20SVWZ+Sepa?21remittance?22information");

            Assert.AreEqual("Sepa\r\nremittance\r\ninformation", information.SepaRemittanceInformation);
        }
Exemple #6
0
        public void AdditionalInfoParser_ParseInformation_FieldCode20COAM_ShouldParseCompensationAmount()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?20COAM+Compensation amount");

            Assert.AreEqual("Compensation amount", information.CompensationAmount);
        }
Exemple #7
0
        public void AdditionalInfoParser_ParseInformation_FieldCode20OAMT_ShouldParseOriginalAmount()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?20OAMT+Original amount");

            Assert.AreEqual("Original amount", information.OriginalAmount);
        }
Exemple #8
0
        public void AdditionalInfoParser_ParseInformation_FieldCode20UnknownIdentifier_MultiPart_ShouldParseUnstructuredRemittanceInformation()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?20First line?21Second line");

            Assert.AreEqual("First line\r\nSecond line", information.UnstructuredRemittanceInformation);
        }
Exemple #9
0
        public void AdditionalInfoParser_ParseInformation_FieldCode20EREF_ShouldParseEndToEndReference()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?20EREF+End to end reference");

            Assert.AreEqual("End to end reference", information.EndToEndReference);
        }
Exemple #10
0
        public void AdditionalInfoParser_ParseInformation_FieldCode20UnknownIdentifier_ShouldParseUnstructuredRemittanceInformation()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?20ABCD+");

            Assert.AreEqual("ABCD+", information.UnstructuredRemittanceInformation);
        }
Exemple #11
0
        public void AdditionalInfoParser_ParseInformation_FieldCode20UnknownIdentifier_ContainsSeparator_ShouldParseCompleteUnstructuredRemittanceInformation()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?20This is?some rather unstructured?remittance information");

            Assert.AreEqual("This is?some rather unstructured?remittance information", information.UnstructuredRemittanceInformation);
        }
Exemple #12
0
        public void AdditionalInfoParser_ParseInformation_FieldCode20IsEmpty_ShouldParseAsUnstructuredRemittanceInformation()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?20");

            Assert.AreEqual("", information.UnstructuredRemittanceInformation);
        }
Exemple #13
0
        public void AdditionalInfoParser_ParseInformation_FieldCode34_ShouldParseTextKeyAddition()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?34345");

            Assert.AreEqual(345, information.TextKeyAddition);
        }
Exemple #14
0
        public void AdditionalInfoParser_ParseInformation_FieldCode32Ans33_ContainsSeparator_ShouldParseCompleteNameOfPayer()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?32Name?of?33 the?payer");

            Assert.AreEqual("Name?of the?payer", information.NameOfPayer);
        }
Exemple #15
0
        public void AdditionalInfoParser_ParseInformation_FieldCode20DEBT_ShouldParseOriginatorsIdentificationCode()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?20DEBT+Originators identification code");

            Assert.AreEqual("Originators identification code", information.OriginatorsIdentificationCode);
        }
Exemple #16
0
        public void AdditionalInfoParser_ParseInformation_FieldCode20EREF_MultiPart_ContainsSeparator_ShouldParseCompleteEndToEndReference()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?20EREF+End to?end?21 reference");

            Assert.AreEqual("End to?end reference", information.EndToEndReference);
        }
Exemple #17
0
        public void AdditionalInfoParser_ParseInformation_FieldCode20DEBT_MultiPart_ContainsSeparator_ShouldParseCompleteOriginatorsIdentificationCode()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?20DEBT+Originators?21?identification code");

            Assert.AreEqual("Originators?identification code", information.OriginatorsIdentificationCode);
        }
Exemple #18
0
        public void AdditionalInfoParser_ParseInformation_FieldCode20KREF_ShouldParseCustomerReference()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?20KREF+Customer reference");

            Assert.AreEqual("Customer reference", information.CustomerReference);
        }
Exemple #19
0
        public void AdditionalInfoParser_ParseInformation_FieldCode20COAM_MultiPart_ContainsSeparator_ShouldParseCompleteCompensationAmount()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?20COAM+Compensation?21?amount");

            Assert.AreEqual("Compensation?amount", information.CompensationAmount);
        }
Exemple #20
0
        public void AdditionalInfoParser_ParseInformation_FieldCode20KREF_MultiPart_ContainsSeparator_ShouldParseCompleteCustomerReference()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?20KREF+The?Customer?21 reference");

            Assert.AreEqual("The?Customer reference", information.CustomerReference);
        }
Exemple #21
0
        public void AdditionalInfoParser_ParseInformation_FieldCode20OAMT_MultiPart_ContainsSeparator_ShouldParseCompleteOriginalAmount()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?20OAMT+Original?21?amount");

            Assert.AreEqual("Original?amount", information.OriginalAmount);
        }
Exemple #22
0
        public void AdditionalInfoParser_ParseInformation_FieldCode20MREF_ShouldParseMandateReference()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?20MREF+Mandate reference");

            Assert.AreEqual("Mandate reference", information.MandateReference);
        }
Exemple #23
0
        public void AdditionalInfoParser_ParseInformation_FieldCode20SVWZ_MultiPart_ContainsSeparator_ShouldParseCompleteSepaRemittanceInformation()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?20SVWZ+Sepa?remittance?21information");

            Assert.AreEqual("Sepa?remittance\r\ninformation", information.SepaRemittanceInformation);
        }
Exemple #24
0
        public void AdditionalInfoParser_ParseInformation_FieldCode20MREF_MultiPart_ContainsSeparator_ShouldParseCompleteMandateReference()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?20MREF+Mandate?21 ref?erence");

            Assert.AreEqual("Mandate ref?erence", information.MandateReference);
        }
Exemple #25
0
        public void AdditionalInfoParser_ParseInformation_FieldCode20ABWA_ContainsSeparator_ShouldParseCompletePayersReferenceParty()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?20ABWA+Payers reference?party");

            Assert.AreEqual("Payers reference?party", information.PayersReferenceParty);
        }
Exemple #26
0
        public void AdditionalInfoParser_ParseInformation_FieldCode20CRED_ShouldParseCreditorReference()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?20CRED+Creditor reference");

            Assert.AreEqual("Creditor reference", information.CreditorReference);
        }
Exemple #27
0
        public void AdditionalInfoParser_ParseInformation_FieldCode20ABWE_ShouldParseCreditorsReferenceParty()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?20ABWE+Creditors reference party");

            Assert.AreEqual("Creditors reference party", information.CreditorsReferenceParty);
        }
Exemple #28
0
        public void AdditionalInfoParser_ParseInformation_FieldCode20CRED_MultiPart_ContainsSeparator_ShouldParseCompleteCreditorReference()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?20CRED+Creditor?21 ref?erence");

            Assert.AreEqual("Creditor ref?erence", information.CreditorReference);
        }
Exemple #29
0
        public void AdditionalInfoParser_ParseInformation_ValidData_ShouldParseTransactionCode()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("123?00Posting text");

            Assert.AreEqual(123, information.TransactionCode);
        }
Exemple #30
0
        public void AdditionalInfoParser_ParseInformation_ValueIsEmpty_ShouldParseAsUnstructuredData()
        {
            var parser      = new AdditionalInfoParser();
            var information = parser.ParseInformation("");

            Assert.IsTrue(information.IsUnstructuredData);
        }