Esempio n. 1
0
            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);
            }
Esempio n. 2
0
            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);
            }