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

                var newDeal      = new NewDeal("title");
                var customFields = new Dictionary <string, ICustomField>()
                {
                    { "5913c8efdcf5c641a516d1fbd498235544b1b195", new LongCustomField(123) }
                };

                newDeal.CustomFields = customFields;
                client.Create(newDeal);

                connection.Received().Post <Deal>(Arg.Is <Uri>(u => u.ToString() == "deals"),
                                                  Arg.Is <NewDeal>(d => d.Title == "title" && d.CustomFields == customFields));
            }
            public async Task EnsuresNonNullArguments()
            {
                var client = new DealsClient(Substitute.For <IApiConnection>());

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