Exemple #1
0
            public async Task RequestsCorrectUrl()
            {
                var connection = Substitute.For <IApiConnection>();
                var client     = new UsersClient(connection);

                await client.GetByEmail("email");

                Received.InOrder(async() =>
                {
                    await connection.GetAll <User>(Arg.Is <Uri>(u => u.ToString() == "users/find"),
                                                   Arg.Is <Dictionary <string, string> >(d => d.Count == 2 &&
                                                                                         d["term"] == "email" &&
                                                                                         d["search_by_email"] == "1"));
                });
            }