Exemple #1
0
            public void Returns_expected_attributes(string path, FileAttributes expected)
            {
                // ARRANGE
                var sut = new EmbeddedResourcesFileSystem(Assembly.GetExecutingAssembly());

                // ACT
                var actual = sut.GetAttributes(path);

                // ASSERT
                Assert.Equal(expected, actual);
            }
Exemple #2
0
            public void Throws_IOException_if_file_or_directory_does_not_exist(string path)
            {
                // ARRANGE
                var    sut = new EmbeddedResourcesFileSystem(Assembly.GetExecutingAssembly());
                Action act = () => sut.GetAttributes(path);

                // ACT
                var ex = Record.Exception(act);

                // ASSERT
                Assert.IsType <IOException>(ex);
                Assert.Contains("does not exist", ex.Message);
            }