Skip to content

Commit a8930a1

Browse files
committed
fix tests
1 parent c528a7f commit a8930a1

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/pax.XRechnung.NET.tests/SchematronValidationTests.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,10 @@ public async Task CanIdentifyXmlInvoiceValidationErrors()
224224
[TestMethod]
225225
public async Task CanValidateBaseDtoSchematronTest()
226226
{
227+
if (!kositServerIsRunning)
228+
{
229+
Assert.Inconclusive("Kosit Validator is not running on localhost:8080.");
230+
}
227231
var invoiceBaseDto = BaseDtoTests.GetInvoiceBaseDto();
228232
InvoiceMapper invoiceMapper = new();
229233
XmlInvoice xmlInvoice = invoiceMapper.ToXml(invoiceBaseDto);
@@ -236,6 +240,10 @@ public async Task CanValidateBaseDtoSchematronTest()
236240
[TestMethod]
237241
public async Task CanValidateBaseDtoSchematronWithRoundingTest()
238242
{
243+
if (!kositServerIsRunning)
244+
{
245+
Assert.Inconclusive("Kosit Validator is not running on localhost:8080.");
246+
}
239247
var invoiceBaseDto = BaseDtoTests.GetInvoiceBaseDto();
240248

241249
var quantity = 1.17777;

src/pax.XRechnung.NET.tests/XmlInvoiceTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,7 @@ public void CanValidate()
148148
XmlDocument document = new();
149149
document.Schemas = XmlInvoiceWriter.GetSchemaSet();
150150

151-
// remove xml declaration
152-
var lines = xmlText.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries);
153-
var adjustedText = String.Join(Environment.NewLine, lines[1..]);
154-
document.LoadXml(adjustedText);
151+
document.LoadXml(xmlText);
155152

156153
// Act
157154
bool validationErrorsFound = false;

0 commit comments

Comments
 (0)