Skip to content

Commit

Permalink
Refined tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jaime-olivares committed Oct 18, 2024
1 parent f3af4bc commit 13e1914
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -580,15 +580,15 @@ public void RemoveTrailingComponentsTest_OnlyTrailingComponentsRemoved()
{
var message = new Message();

var orcSegment = new Segment("ORC", new HL7Encoding());
var orcSegment = new Segment("ORC", message.Encoding);
for (int eachField = 1; eachField <= 12; eachField++)
{
orcSegment.AddEmptyField();
}

for (int eachComponent = 1; eachComponent < 8; eachComponent++)
{
orcSegment.Fields(12).AddNewComponent(new Component(new HL7Encoding()));
orcSegment.Fields(12).AddNewComponent(new Component(message.Encoding));
}

orcSegment.Fields(12).Components(1).Value = "should not be removed";
Expand All @@ -613,15 +613,15 @@ public void RemoveTrailingComponentsTest_RemoveAllFieldComponentsIfEmpty()
{
var message = new Message();

var orcSegment = new Segment("ORC", new HL7Encoding());
var orcSegment = new Segment("ORC", message.Encoding);
for (int eachField = 1; eachField <= 12; eachField++)
{
orcSegment.AddEmptyField();
}

for (int eachComponent = 1; eachComponent < 8; eachComponent++)
{
orcSegment.Fields(12).AddNewComponent(new Component(new HL7Encoding()));
orcSegment.Fields(12).AddNewComponent(new Component(message.Encoding));
orcSegment.Fields(12).Components(eachComponent).Value = string.Empty;
}

Expand Down

0 comments on commit 13e1914

Please sign in to comment.