public async Task EnsuresArgumentsNotNull() { var connection = Substitute.For<IApiConnection>(); var client = new GistsClient(connection); Assert.Throws<ArgumentNullException>(() => client.Delete(null)); }
public void PostsToTheCorrectUrl() { var connection = Substitute.For<IApiConnection>(); var client = new GistsClient(connection); client.Delete("1"); connection.Received().Delete(Arg.Is<Uri>(u => u.ToString() == "gists/1")); }