public void FromDelimitedString_WithAllProperties_ReturnsCorrectlyInitializedFields()
        {
            ISegment expected = new PceSegment
            {
                SetIdPce = 1,
                CostCenterAccountNumber = new ExtendedCompositeIdWithCheckDigit
                {
                    IdNumber = "2"
                },
                TransactionCode = new CodedWithExceptions
                {
                    Identifier = "3"
                },
                TransactionAmountUnit = new CompositePrice
                {
                    Price = new Money
                    {
                        Quantity = 4
                    }
                }
            };

            ISegment actual = new PceSegment();

            actual.FromDelimitedString("PCE|1|2|3|4");

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