Skip to content

Commit 17059c7

Browse files
committed
Updated SwissQRCode test cases
1 parent 31b6875 commit 17059c7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

QRCoder/PayloadGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,7 @@ public override string ToString()
11401140
//AddInf "logical" element
11411141
SwissQrCodePayload += (!string.IsNullOrEmpty(additionalInformation.UnstructureMessage) ? additionalInformation.UnstructureMessage : string.Empty) + br; //Ustrd
11421142
SwissQrCodePayload += additionalInformation.Trailer + br; //Trailer
1143-
// Bugfix from #399 If BillInformation is empty, insert no linebreak
1143+
// Bugfix PR #399 If BillInformation is empty, insert no linebreak
11441144
SwissQrCodePayload += (!string.IsNullOrEmpty(additionalInformation.BillInformation) ? additionalInformation.BillInformation + br : string.Empty); //StrdBkgInf
11451145

11461146
//AltPmtInf "logical" element

QRCoderTests/PayloadGeneratorTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2509,7 +2509,7 @@ public void swissqrcode_generator_should_generate_swisscode_simple()
25092509

25102510
generator
25112511
.ToString()
2512-
.ShouldBe("SPC\r\n0200\r\n1\r\nCH2430043000000789012\r\nS\r\nJohn Doe\r\nParlamentsgebäude\r\n1\r\n3003\r\nBern\r\nCH\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nEUR\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nQRR\r\n990005000000000320071012303\r\n\r\nEPD\r\n");
2512+
.ShouldBe("SPC\r\n0200\r\n1\r\nCH2430043000000789012\r\nS\r\nJohn Doe\r\nParlamentsgebäude\r\n1\r\n3003\r\nBern\r\nCH\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nEUR\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nQRR\r\n990005000000000320071012303\r\n\r\nEPD");
25132513
}
25142514

25152515
[Fact]
@@ -2528,7 +2528,7 @@ public void swissqrcode_generator_should_generate_swisscode_full()
25282528

25292529
generator
25302530
.ToString()
2531-
.ShouldBe("SPC\r\n0200\r\n1\r\nCH2430043000000789012\r\nS\r\nJohn Doe\r\nParlamentsgebäude\r\n1\r\n3003\r\nBern\r\nCH\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n100.25\r\nCHF\r\nS\r\nJohn Doe\r\nParlamentsgebäude\r\n1\r\n3003\r\nBern\r\nCH\r\nQRR\r\n990005000000000320071012303\r\nThis is my unstructured message.\r\nEPDSome bill information here...");
2531+
.ShouldBe("SPC\r\n0200\r\n1\r\nCH2430043000000789012\r\nS\r\nJohn Doe\r\nParlamentsgebäude\r\n1\r\n3003\r\nBern\r\nCH\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n100.25\r\nCHF\r\nS\r\nJohn Doe\r\nParlamentsgebäude\r\n1\r\n3003\r\nBern\r\nCH\r\nQRR\r\n990005000000000320071012303\r\nThis is my unstructured message.\r\nEPD\r\nSome bill information here...");
25322532
}
25332533

25342534

0 commit comments

Comments
 (0)