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

                var expectedUri = "user/gpg_keys/1";

                client.Delete(1);

                connection.Received().Delete(Arg.Is <Uri>(u => u.ToString() == expectedUri));
            }
示例#2
0
            public void RequestsTheCorrectUrl()
            {
                var connection = Substitute.For <IApiConnection>();
                var client     = new UserGpgKeysClient(connection);

                var expectedUri = "user/gpg_keys/1";

                client.Delete(1);

                connection.Received().Delete(
                    Arg.Is <Uri>(u => u.ToString() == expectedUri),
                    Arg.Any <object>(),
                    Arg.Is <string>(s => s == "application/vnd.github.cryptographer-preview"));
            }
            public void RequestsTheCorrectUrl()
            {
                var connection = Substitute.For<IApiConnection>();
                var client = new UserGpgKeysClient(connection);

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

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