public void op_Line_KeyStringDictionaryNull_IListOfString() { var columns = new List<string> { "A" }; Assert.Throws<ArgumentNullException>(() => Tsv.Line(null, columns)); }
public void op_Line_IEnumerableString_whenEmptyValue() { var obj = new List<string> { string.Empty, "ABC" }; const string expected = "\tABC"; var actual = Tsv.Line(obj); Assert.Equal(expected, actual); }
public void op_Line_IEnumerableString() { var obj = new List<string> { "123", "ABC" }; const string expected = "123\tABC"; var actual = Tsv.Line(obj); Assert.Equal(expected, actual); }
public void op_Line_KeyStringDictionary_whenEmptyValue() { var obj = new KeyStringDictionary { new KeyStringPair("A", string.Empty), new KeyStringPair("B", "XYZ") }; const string expected = "\tXYZ"; var actual = Tsv.Line(obj); Assert.Equal(expected, actual); }
public void op_Line_KeyStringDictionary() { var obj = new KeyStringDictionary { new KeyStringPair("A", "123"), new KeyStringPair("B", "XYZ") }; const string expected = "123\tXYZ"; var actual = Tsv.Line(obj); Assert.Equal(expected, actual); }
public void op_Line_KeyStringDictionary_IListOfString() { var obj = new KeyStringDictionary { new KeyStringPair("A", "123"), new KeyStringPair("B", "ignore"), new KeyStringPair("C", "XYZ") }; const string expected = "123\tXYZ"; var actual = Tsv.Line(obj, "A|C".Split('|').ToList()); Assert.Equal(expected, actual); }
public void op_Line_IEnumerableStringNull() { Assert.Throws<ArgumentNullException>(() => Tsv.Line(null as IEnumerable<string>)); }
public void op_Line_IEnumerableStringEmpty() { Assert.Throws<ArgumentOutOfRangeException>(() => Tsv.Line(new List<string>())); }
public void op_Line_KeyStringDictionary_IListOfString_whenColumnsNotFound() { Assert.Throws<KeyNotFoundException>(() => Tsv.Line(new KeyStringDictionary(), "A,B".Split(',').ToList())); }
public void op_Line_KeyStringDictionary_IListOfStringNull() { Assert.Throws<ArgumentNullException>(() => Tsv.Line(new KeyStringDictionary(), null as IList<string>)); }
public void op_Line_KeyStringDictionary_IListOfStringEmpty() { Assert.Throws<ArgumentOutOfRangeException>(() => Tsv.Line(new KeyStringDictionary(), new List<string>())); }
public void op_Line_KeyStringDictionaryNull() { Assert.Throws<ArgumentNullException>(() => Tsv.Line(null as KeyStringDictionary)); }