public void op_GetData_MethodInfo_Types_whenParameterCountMismatch() { var obj = new JsonDataAttribute("{ \"Value\": 1 }", "{ \"Value\": 2 }"); Assert.Throws<InvalidOperationException>(() => obj.GetData(GetType().GetMethod("usage"), new[] { typeof(JObject) }).ToList()); }
public void op_GetData_MethodInfo_TypesNull() { var obj = new JsonDataAttribute("{ \"Value\": 999 }"); Assert.Throws<ArgumentNullException>(() => obj.GetData(GetType().GetMethod("usage"), null).ToList()); }
public void op_GetData_MethodInfo_Types_whenInvalidParameterType() { var obj = new JsonDataAttribute("{ \"Value\": 999 }"); Assert.Throws<JsonReaderException>(() => obj.GetData(GetType().GetMethod("usage"), new[] { typeof(string) }).ToList()); }
public void op_GetData_MethodInfoNull_Types() { var obj = new JsonDataAttribute("{ \"Value\": 999 }"); Assert.Throws<ArgumentNullException>(() => obj.GetData(null, new[] { typeof(JObject) }).ToList()); }
public void op_GetData_MethodInfo_Types_whenParameterCountMismatch() { var obj = new JsonDataAttribute("{ \"Value\": 1 }", "{ \"Value\": 2 }"); Assert.Throws <InvalidOperationException>(() => obj.GetData(GetType().GetMethod("usage"), new[] { typeof(JObject) }).ToList()); }
public void op_GetData_MethodInfo_Types_whenInvalidParameterType() { var obj = new JsonDataAttribute("{ \"Value\": 999 }"); Assert.Throws <JsonReaderException>(() => obj.GetData(GetType().GetMethod("usage"), new[] { typeof(string) }).ToList()); }
public void op_GetData_MethodInfo_TypesNull() { var obj = new JsonDataAttribute("{ \"Value\": 999 }"); Assert.Throws <ArgumentNullException>(() => obj.GetData(GetType().GetMethod("usage"), null).ToList()); }
public void op_GetData_MethodInfoNull_Types() { var obj = new JsonDataAttribute("{ \"Value\": 999 }"); Assert.Throws <ArgumentNullException>(() => obj.GetData(null, new[] { typeof(JObject) }).ToList()); }