コード例 #1
0
            public async Task RequestsCorrectUrl()
            {
                var connection = Substitute.For <IApiConnection>();
                var client     = new ProductsClient(connection);

                await client.GetDealsForProduct(123);

                Received.InOrder(async() =>
                {
                    await connection.Get <IReadOnlyList <Deal> >(Arg.Is <Uri>(u => u.ToString() == "products/123/deals"));
                });
            }