public void PostsToTheCorrectUrl()
            {
                var connection = Substitute.For <IApiConnection>();
                var client     = new PersonFieldsClient(connection);

                var newPersonField = new NewPersonField("name", FieldType.org);

                client.Create(newPersonField);

                connection.Received().Post <PersonField>(Arg.Is <Uri>(u => u.ToString() == "personFields"),
                                                         Arg.Is <NewPersonField>(df => df.Name == "name" &&
                                                                                 df.FieldType == FieldType.org));
            }
            public async Task EnsuresNonNullArguments()
            {
                var client = new PersonFieldsClient(Substitute.For <IApiConnection>());

                await Assert.ThrowsAsync <ArgumentNullException>(() => client.Create(null));
            }