public void then_the_request_should_be_made_with_no_parameters() { // Act var request = _authenticatedRequestFactory.Build(PusherMethod.GET, "/testPath"); // Assert Assert.IsNotNull(request); Assert.AreEqual(PusherMethod.GET, request.Method); StringAssert.StartsWith(@"/apps/test_app_id/testPath?", request.ResourceUri); StringAssert.Contains(@"auth_version=1.0", request.ResourceUri); StringAssert.Contains(@"auth_key=test_app_key", request.ResourceUri); StringAssert.Contains(@"auth_timestamp=", request.ResourceUri); }
public async void then_the_get_request_should_be_made_with_a_valid_resource() { var factory = new AuthenticatedRequestFactory(Config.AppKey, Config.AppId, Config.AppSecret); var request = factory.Build(PusherMethod.GET, "/channels/newRestClient"); var client = new PusherRestClient("http://api.pusherapp.com", "pusher-http-dotnet", Version.Parse("4.0.0")); var response = await client.ExecuteGetAsync <TestOccupied>(request); Assert.IsNotNull(response); Assert.IsFalse(response.Data.Occupied); }