public void ValidateDataTypeException_3() { OwlFlatFileConfig owlConfig = GetConfig(@"examples\flatfile\3\owl-config-flatfile.xml"); FlatFileDocument document = new FlatFileDocument(); string original = GetContent(@"examples\flatfile\3\test.txt"); document.LoadContent(owlConfig, original); string content = document.ToString(); }
public void ValidateContent_1() { OwlFlatFileConfig owlConfig = GetConfig(@"examples\flatfile\1\owl-config-flatfile.xml"); FlatFileDocument document = new FlatFileDocument(); string original = GetContent(@"examples\flatfile\1\test.txt"); document.LoadContent(owlConfig, original); string content = document.ToString(); Assert.AreEqual(original, content); }
public void ValidateDataTypeMessage_3() { try { OwlFlatFileConfig owlConfig = GetConfig(@"examples\flatfile\3\owl-config-flatfile.xml"); FlatFileDocument document = new FlatFileDocument(); string original = GetContent(@"examples\flatfile\3\test.txt"); document.LoadContent(owlConfig, original); string content = document.ToString(); } catch (OwlDataTypeException e) { Assert.AreEqual("The element: 'enc_1' - section: 'ENC' have data-type: 'int' and the sent value is: '770.2'", e.Message); } }
public void ValidateRequiredMessage_2() { try { OwlFlatFileConfig owlConfig = GetConfig(@"examples\flatfile\2\owl-config-flatfile.xml"); FlatFileDocument document = new FlatFileDocument(); string original = GetContent(@"examples\flatfile\2\test.txt"); document.LoadContent(owlConfig, original); string content = document.ToString(); } catch (OwlRequiredException e) { Assert.AreEqual("The element: 'enc_1' - section: 'ENC' is required", e.Message); } }
public void ValidateLengthTypeMessage_4() { try { OwlFlatFileConfig owlConfig = GetConfig(@"examples\flatfile\4\owl-config-flatfile.xml"); FlatFileDocument document = new FlatFileDocument(); string original = GetContent(@"examples\flatfile\4\test.txt"); document.LoadContent(owlConfig, original); string content = document.ToString(); } catch (OwlLengthException e) { Assert.AreEqual("The element: 'loc_1' - section: 'LOC' have length: '3' and the allowed length is: '2' - sent value is: '770'", e.Message); } }