private static JsonResult _CreateJsonResult(WidgetType widgetType, object data) { var request = new HttpRequestBaseMock(FixtureConstants.Authorization_Test123, "json", ((int)widgetType).ToString()); var t = new GeckoboardService(request, (a, b) => data, a => a == FixtureConstants.Authorization_Test123_Source ); var res = t.Result() as JsonResult; Assert.IsNotNull(res); return(res); }
public void ApIKeyValidationOmittedShouldPass() { var request = new HttpRequestBaseMock(FixtureConstants.Authorization_Test123, "json", "4"); var t = new GeckoboardService(request, (a, b) => new List <DataItemText> { new DataItemText { type = 1, text = "blah" } }, null // <-- ); t.Result(); }
public void ThisIsAValidApiKey() { var request = new HttpRequestBaseMock(FixtureConstants.Authorization_Test123, "json", "4"); var t = new GeckoboardService(request, (a, b) => new List <DataItemText> { new DataItemText { type = 1, text = "blah" } }, a => a == FixtureConstants.Authorization_Test123_Source // <-- ); t.Result(); }