public async Task EnsuresNonNullArguments() { var client = new ObservableProjectsClient(Substitute.For <IGitHubClient>()); var newProject = new NewProject("someName"); await Assert.ThrowsAsync <ArgumentNullException>(() => client.CreateForRepository(1, null).ToTask()); }
public void PostsToCorrectURL() { var gitHubClient = Substitute.For <IGitHubClient>(); var client = new ObservableProjectsClient(gitHubClient); var newProject = new NewProject("someName"); client.CreateForRepository(1, newProject); gitHubClient.Repository.Project.Received().CreateForRepository(1, newProject); }