Esempio n. 1
0
        public async Task FileRead_ValidPath_NoErrors()
        {
            var data = await _fileReaderAsync.ReadFileAsync(_ValidPath);

            Assert.IsNotNull(data);
            Assert.IsTrue(data.Length > 0);
        }
Esempio n. 2
0
        public async Task FileRead_ConstructorOperationNotValidAndFileNotFoundException_NotFound()
        {
            _fileReaderAsync = new FileReaderAsync(true);
            var data = await _fileReaderAsync.ReadFileAsync(_InvalidPath);

            Assert.IsNotNull(data);
            Assert.IsTrue(data.Length > 0);
        }
Esempio n. 3
0
 public async Task FileRead_ConstructorOperationNotValidAndFileNotFoundException_Found()
 {
     Assert.ThrowsException <InvalidOperationException>(() => _fileReaderAsync = new FileReaderAsync(true));
     // Reinitialize
     _fileReaderAsync = new FileReaderAsync();
     await Assert.ThrowsExceptionAsync <FileNotFoundException>(async() => await _fileReaderAsync.ReadFileAsync(_InvalidPath));
 }