Пример #1
0
        public void Read_ThrowsFileNotFoundException_WhenFileDoesntExist()
        {
            //Arrange
            var file = new LocalFile($@"C:\{Guid.NewGuid()}.txt");

            //Act & Assert
            file.Read(); //Exception
        }
Пример #2
0
        public async Task ReadAsync_ThrowsFileNotFoundException_WhenFileDoesntExist()
        {
            //Arrange
            var file = new LocalFile($@"C:\{Guid.NewGuid()}.txt");

            //Act & Assert
            await file.ReadAsync(); //Exception
        }
Пример #3
0
        public void Write_ThrowsArgumentNullException_WhenStreamIsNull()
        {
            //Arrange
            var file = new LocalFile(@"C:\TestPath");

            //Act
            file.Write(null); //Exception
        }