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")); }
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")); }