예제 #1
0
        public void should_read_date_string_from_creation_date_time()
        {
            var header = new FunctionalGroupHeader("GS*BE*SENDER CODE*RECEIVER CODE*19991231*0802*1*X*005010X220");

            header.CreationDateTime = DateTime.Today;
            header.DateString.Should().Be(DateTime.Today.ToString(openx12.Constants.DateFormatting.CCYYMMDD));
        }
예제 #2
0
        public void should_read_time_string_from_creation_date_time()
        {
            var header = new FunctionalGroupHeader("GS*BE*SENDER CODE*RECEIVER CODE*19991231*0802*1*X*005010X220");
            var now    = DateTime.Now;

            header.CreationDateTime = now;
            header.TimeString.Should().Be(now.ToString(openx12.Constants.TimeFormatting.HHMM));
        }
예제 #3
0
        public void should_instantiate_funcitonal_group_header_with_properties()
        {
            var header = new FunctionalGroupHeader {
                FunctionalIdentifierCode         = "BE",
                ApplicationSendersCode           = "SENDER CODE",
                ApplicationReceiversCode         = "RECEIVER CODE",
                CreationDateTime                 = new DateTime(1999, 12, 31, 08, 02, 00),
                GroupControlNumber               = "1",
                ResponsibleAgencyCode            = "X",
                VersionReleaseIndustryIdentifier = "005010X220"
            };

            header.Value.Should().Be(_FunctionalGroupString);
        }
예제 #4
0
 public void Setup()
 {
     _Header = new FunctionalGroupHeader(_FunctionalGroupString);
 }