//DC public void setCodeCompletionData(ICompletionData[] completionData) { this.completionData = FilterCompletionData.notNull() ? FilterCompletionData.invoke(completionData) : completionData; //parentForm.invokeOnThread(() => loadGui()); control.invokeOnThread(() => loadGui()); }
//helper methods public void checkSecurityMappings(Allowed_User allowedUser, Func <Test_User> loginFunction) { Action loginUser = () => { if (loginFunction.notNull()) // we need to login before each invocation since there are GET and POST calls that reset the current user { Assert.NotNull(loginFunction.invoke().notNull()); } }; loginUser(); checkSecurityMappings(allowedUser, SecurityMappings_GET, getResult_GET); loginUser(); checkSecurityMappings(allowedUser, SecurityMappings_POST, getResult_POST); loginUser(); checkSecurityMappings(allowedUser, SecurityMappings_PUT, getResult_PUT); }
//helper methods public void checkSecurityMappings(Allowed_User allowedUser, Func<Test_User> loginFunction) { Action loginUser = ()=> { if (loginFunction.notNull()) // we need to login before each invocation since there are GET and POST calls that reset the current user { Assert.NotNull(loginFunction.invoke().notNull()); } }; loginUser(); checkSecurityMappings(allowedUser, SecurityMappings_GET, getResult_GET); loginUser(); checkSecurityMappings(allowedUser, SecurityMappings_POST, getResult_POST); loginUser(); checkSecurityMappings(allowedUser, SecurityMappings_PUT, getResult_PUT); }
public static T console_WriteLine <T>(this T _object, Func <string> getTextToOutput) { Console.WriteLine(getTextToOutput.invoke()); return(_object); }