CreateNewContact() public méthode

public CreateNewContact ( string contact ) : System.Json.JsonObject
contact string
Résultat System.Json.JsonObject
        public void ContactsCreateNewContactRequestFormedCorrectly()
        {
            var mockDataSource = MockRepository.GenerateMock<IWebClient>();
            string expectedUrl = Constants.CreateNewContactUrl;

            // Arrange
            mockDataSource
                .Stub(x => x.UploadString(
                    Arg<string>.Is.Anything, // uri
                    Arg<string>.Is.Anything, // method
                    Arg<string>.Is.Anything, // content-type
                    Arg<string>.Is.Anything // data
                               ))
                .Return(string.Empty);

            // Act
            var target = new Contacts(apiKey: Constants.ApiKey)
                {
                    UserWebClient = mockDataSource
                };
            target.CreateNewContact(string.Empty);

            // Assert
            mockDataSource.AssertWasCalled(c => c.UploadString(
                uri: Arg<string>.Matches(actualUrl => actualUrl == expectedUrl),
                method: Arg<string>.Matches(actaulMethod => actaulMethod == "POST"),
                contentType: Arg<string>.Matches(actualContentType => actualContentType == "application/json"),
                data: Arg<string>.Is.Anything));
        }