示例#1
0
            public void RequestsTheCorrectUrl()
            {
                var connection = Substitute.For <IApiConnection>();
                var client     = new UserGpgKeysClient(connection);

                var expectedUri = "user/gpg_keys/1";

                client.Get(1);

                connection.Received().Get <GpgKey>(Arg.Is <Uri>(u => u.ToString() == expectedUri));
            }
            public void RequestsTheCorrectUrl()
            {
                var connection = Substitute.For<IApiConnection>();
                var client = new UserGpgKeysClient(connection);

                var expectedUri = "user/gpg_keys/1";
                client.Get(1);

                connection.Received().Get<GpgKey>(
                    Arg.Is<Uri>(u => u.ToString() == expectedUri),
                    Arg.Any<Dictionary<string, string>>(),
                    Arg.Is<string>(s => s == "application/vnd.github.cryptographer-preview"));
            }
示例#3
0
            public void RequestsTheCorrectUrl()
            {
                var connection = Substitute.For <IApiConnection>();
                var client     = new UserGpgKeysClient(connection);

                var expectedUri = "user/gpg_keys/1";

                client.Get(1);

                connection.Received().Get <GpgKey>(
                    Arg.Is <Uri>(u => u.ToString() == expectedUri),
                    Arg.Any <Dictionary <string, string> >(),
                    Arg.Is <string>(s => s == "application/vnd.github.cryptographer-preview"));
            }