public void op_Download_AbsoluteUri() { const string expected = "A1"; var actual = CsvHttpAttribute.Download("http://www.alan-dean.com/example.csv").First()["A"]; Assert.Equal(expected, actual); }
public void op_GetData_MethodInfo_Types_whenParameterCountMismatch() { var obj = new CsvHttpAttribute("http://www.alan-dean.com/one.csv", "http://www.alan-dean.com/two.csv"); Assert.Throws <InvalidOperationException>(() => obj.GetData(GetType().GetMethod("usage"), new[] { typeof(CsvDataSheet) }).ToList()); }
public void op_GetData_MethodInfo_Types_whenInvalidParameterType() { var obj = new CsvHttpAttribute("http://www.alan-dean.com/example.csv"); Assert.Throws <InvalidOperationException>(() => obj.GetData(GetType().GetMethod("usage"), new[] { typeof(string) }).ToList()); }
public void op_GetData_MethodInfo_TypesNull() { var obj = new CsvHttpAttribute("http://www.alan-dean.com/example.csv"); Assert.Throws <ArgumentNullException>(() => obj.GetData(GetType().GetMethod("usage"), null).ToList()); }
public void op_GetData_MethodInfoNull_Types() { var obj = new CsvHttpAttribute("example.csv"); Assert.Throws <ArgumentNullException>(() => obj.GetData(null, new[] { typeof(CsvDataSheet) }).ToList()); }
public void op_Download_AbsoluteUriNull() { Assert.Throws <ArgumentNullException>(() => CsvHttpAttribute.Download(null)); }
public void op_Download_AbsoluteUriNotFound() { Assert.Throws <WebException>(() => CsvHttpAttribute.Download("http://www.alan-dean.com/missing.csv")); }
public void op_GetData_MethodInfo_Types_whenParameterCountMismatch() { var obj = new CsvHttpAttribute("http://www.alan-dean.com/one.csv", "http://www.alan-dean.com/two.csv"); Assert.Throws<InvalidOperationException>(() => obj.GetData(GetType().GetMethod("usage"), new[] { typeof(CsvDataSheet) }).ToList()); }
public void op_GetData_MethodInfo_Types_whenInvalidParameterType() { var obj = new CsvHttpAttribute("http://www.alan-dean.com/example.csv"); Assert.Throws<InvalidOperationException>(() => obj.GetData(GetType().GetMethod("usage"), new[] { typeof(string) }).ToList()); }
public void op_GetData_MethodInfo_TypesNull() { var obj = new CsvHttpAttribute("http://www.alan-dean.com/example.csv"); Assert.Throws<ArgumentNullException>(() => obj.GetData(GetType().GetMethod("usage"), null).ToList()); }
public void op_GetData_MethodInfoNull_Types() { var obj = new CsvHttpAttribute("example.csv"); Assert.Throws<ArgumentNullException>(() => obj.GetData(null, new[] { typeof(CsvDataSheet) }).ToList()); }