public void Setup()
        {
            // Arrange
            _factory = new TestObjectFactory();

            _authenticatedRequestFactory = new AuthenticatedRequestFactory("test_app_key", "test_app_id", "test_app_secret");
            _requestParameters           = _factory.Create("Test Property 1", 2, true);
            _requestBody = _factory.Create("Test Property 4", 5, false);
        }
Beispiel #2
0
        public void then_the_request_should_return_the_body_as_a_string_when_present()
        {
            // Arrange
            var request = new PusherRestRequest("testUrl");

            // Act
            request.Body = _factory.Create("Test Property 1", 2, true);
            var jsonString = request.GetContentAsJsonString();

            // Assert
            Assert.IsNotNull(request);
            StringAssert.Contains("{\"Property1\":\"Test Property 1\",\"Property2\":2,\"Property3\":true}", jsonString);
        }