public void Given_Null_Path_When_CreateDirectory_Invoked_Then_It_Should_Throw_Exception() { var wrapper = new DirectoryWrapper(); Action action = () => wrapper.CreateDirectory(null); action.Should().Throw <ArgumentNullException>(); }
public void Given_Path_When_CreateDirectory_Invoked_Then_It_Should_Return_Result(string directory, bool expected) { var baseDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); var path = Path.Combine(baseDirectory, directory); var wrapper = new DirectoryWrapper(); var result = wrapper.CreateDirectory(path); result.Exists.Should().Be(expected); }