public async void Should_Change_Process_Working_Directory(string dir, string expected) { // Given var fixture = new MkDocsServeAsyncRunnerFixture(); fixture.GivenProjectDirectory(dir); // When var result = await fixture.Run(); // Then Assert.Equal(expected, result.Process.WorkingDirectory.FullPath); }
public async void Should_Throw_For_Empty_Project_Dir() { // Given var fixture = new MkDocsServeAsyncRunnerFixture(); fixture.GivenProjectDirectory(null); // When var result = await(Record.ExceptionAsync(() => fixture.Run()) ?? Task.FromResult <Exception>(null)); // Then Assert.IsType <ArgumentNullException>(result); Assert.Equal("projectDirectory", ((ArgumentNullException)result).ParamName); }