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