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);
        }
Example #2
0
        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();
        }
Example #3
0
        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();
        }