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

                var expectedUri = "user/gpg_keys";

                client.GetAllForCurrent();

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

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

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

                var expectedUri = "user/gpg_keys";

                client.GetAllForCurrent();

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