public void Returns_expected_length(string path, long expected) { // ARRANGE var sut = new EmbeddedResourcesFileSystem(Assembly.GetExecutingAssembly()); // ACT var actual = sut.GetFileLength(path); // ASSERT Assert.Equal(expected, actual); }
public void Throws_FileNotFoundException_if_file_does_not_exist(string path) { // ARRANGE var sut = new EmbeddedResourcesFileSystem(Assembly.GetExecutingAssembly()); Action act = () => sut.GetFileLength(path); // ACT var ex = Record.Exception(act); // ASSERT Assert.IsType <FileNotFoundException>(ex); }