예제 #1
0
 public void LineBreakInField()
 {
     Assert.IsTrue(DelimitedStringValidator.ValidateFormat(3, "1,\"2\n3\",4").IsValid);
 }
예제 #2
0
 public void SpecifiedDelimiter()
 {
     Assert.IsTrue(DelimitedStringValidator.ValidateFormat(3, "1;2;3", delimiter: ';').IsValid);
 }
예제 #3
0
 public void SpecifiedQuoteChar()
 {
     Assert.IsTrue(DelimitedStringValidator.ValidateFormat(3, "1,`2,3`,4", textQualifier: '`').IsValid);
 }
예제 #4
0
 public void FieldEndsWithEscapedDoubleQuote()
 {
     Assert.IsTrue(DelimitedStringValidator.ValidateFormat(1, @"""--""""""").IsValid);
 }
예제 #5
0
 public void OneTwoOrThreeEscapedDoubleQuotesInStrings()
 {
     Assert.IsTrue(DelimitedStringValidator.ValidateFormat(3, "\"\"\"\",\"\"\"\"\"\",\"\"\"\"\"\"\"\"").IsValid);
 }
예제 #6
0
 public void EmptyRecordNotIngored()
 {
     Assert.IsFalse(DelimitedStringValidator.ValidateFormat(4, "").IsValid);
 }
예제 #7
0
 public void EscapedQuote()
 {
     Assert.IsTrue(DelimitedStringValidator.ValidateFormat(3, @"1,""2""""3"",4").IsValid);
 }
예제 #8
0
 public void LeadingEmptyField()
 {
     Assert.IsTrue(DelimitedStringValidator.ValidateFormat(4, ",1,2,3").IsValid);
 }
예제 #9
0
 public void EmptyRecordIgnored()
 {
     Assert.IsTrue(DelimitedStringValidator.ValidateFormat(4, "", ignoreEmptyLines: true).IsValid);
 }
예제 #10
0
 public void QuotedStrings()
 {
     Assert.IsTrue(DelimitedStringValidator.ValidateFormat(3, "Lorem,\"ipsum, dolor, sit\",amet").IsValid);
 }
예제 #11
0
 public void TrailingEmptyField()
 {
     Assert.IsTrue(DelimitedStringValidator.ValidateFormat(4, "1,2,3,").IsValid);
 }
예제 #12
0
 public void BasicStrings()
 {
     Assert.IsTrue(DelimitedStringValidator.ValidateFormat(5, "adipisicing,elit,sed,do,eiusmod").IsValid);
 }
예제 #13
0
 public void FieldBeginsWithComma()
 {
     Assert.IsTrue(DelimitedStringValidator.ValidateFormat(1, "\",a\"").IsValid);
 }
예제 #14
0
 public void TwoBlankFields()
 {
     Assert.IsTrue(DelimitedStringValidator.ValidateFormat(2, ",").IsValid);
 }
예제 #15
0
 public void SpacesInFields()
 {
     Assert.IsTrue(DelimitedStringValidator.ValidateFormat(4, ", 1 ,\" 2 \",").IsValid);
 }
예제 #16
0
 public void BasicNumbers()
 {
     Assert.IsTrue(DelimitedStringValidator.ValidateFormat(3, "1,2,3").IsValid);
 }