public void Test_TSMethod() { //arrange var gen = new TSMethod(typeof(IMethodClass).GetMethod("MyMethod"), (t) => Settings.StartingTypeMap[t]); gen.Initialize(); //act var res = gen.ToTSString(); //assert Assert.IsTrue(res.Contains("MyMethod?(parm1:number/*Int32*/, parm2:string/*String*/):JQueryPromise<string>;")); }
public void Test_TSMethod() { //arrange var gen = new TSMethod(typeof(IMethodClass).GetTypeInfo().GetMethod("MyMethod"), (t) => Settings.StartingTypeMap[t]); gen.Initialize(); //act var res = gen.ToTSString(); //assert Assert.IsTrue(res.Contains("MyMethod?(parm1:number/*Int32*/, parm2:string/*String*/, param3?:string/*Nullable`1*/):JQueryPromise<string>;")); }