170 Add test for fh.ImmediateDestination
170 Add test for fh.ImmediateDestination
@@ -173,9 +173,8 @@ func TestFormatCode(t *testing.T) {
}
}
-func TestFHFieldInculsion(t *testing.T) {
+func TestFHFieldInclusion(t *testing.T) {
fh := mockFileHeader()
- //fh.ImmediateOrigin = "0"
fh.ImmediateOrigin = ""
if err := fh.Validate(); err != nil {
if e, ok := err.(*FieldError); ok {
@@ -330,3 +329,15 @@ func TestFHFieldInclusionCreationDate(t *testing.T) {
}
}
}
+
+func TestFHFieldInclusionImmediateDestination(t *testing.T) {
+ fh := mockFileHeader()
+ fh.ImmediateDestination = ""
+ if err := fh.Validate(); err != nil {
+ if e, ok := err.(*FieldError); ok {
+ if e.Msg != msgFieldInclusion {
+ t.Errorf("%T: %s", err, err)
+ }
+ }
+ }
+}
\ No newline at end of file
