public void MethodLookupIsCaseInsensitive() { ServiceClass clazz = JsonRpcServices.GetClassFromType(typeof(TestService)); Assert.IsNotNull(clazz.FindMethodByName("FOO")); }
public virtual ServiceClass GetClass() { return(mClass ?? (mClass = JsonRpcServices.GetClassFromType(GetType()))); }
public void CustomServiceName() { ServiceClass clazz = JsonRpcServices.GetClassFromType(typeof(TestService)); Assert.AreEqual("MyService", clazz.Name); }
public void TaggedMethodsExported() { ServiceClass clazz = JsonRpcServices.GetClassFromType(typeof(TestService)); Assert.AreEqual(2, clazz.GetMethods().Length); }
public void UntaggedMethodsNotExported() { ServiceClass clazz = JsonRpcServices.GetClassFromType(typeof(EmptyService)); Assert.AreEqual(0, clazz.GetMethods().Length); }
public void ServiceNameIsTypeName() { ServiceClass clazz = JsonRpcServices.GetClassFromType(typeof(EmptyService)); Assert.AreEqual("EmptyService", clazz.Name); }
public void NullType() { JsonRpcServices.GetClassFromType(null); }