Example #1
0
        public void FromDelimitedString_WithAllProperties_ReturnsCorrectlyInitializedFields()
        {
            ISegment expected = new PsgSegment
            {
                ProviderProductServiceGroupNumber = new EntityIdentifier
                {
                    EntityId = "1"
                },
                PayerProductServiceGroupNumber = new EntityIdentifier
                {
                    EntityId = "2"
                },
                ProductServiceGroupSequenceNumber = 3,
                AdjudicateAsGroup = "4",
                ProductServiceGroupBilledAmount = new CompositePrice
                {
                    Price = new Money
                    {
                        Quantity = 5
                    }
                },
                ProductServiceGroupDescription = "6"
            };

            ISegment actual = new PsgSegment();

            actual.FromDelimitedString("PSG|1|2|3|4|5|6");

            expected.Should().BeEquivalentTo(actual);
        }
Example #2
0
 public void FromDelimitedString_WithIncorrectSegmentId_ThrowsArgumentException()
 {
     Assert.Throws <ArgumentException>(() =>
     {
         ISegment hl7Segment = new PsgSegment();
         hl7Segment.FromDelimitedString("PSA|^~&|3|4|5|6");
     });
 }