public async Task TestFileReadMissing()
 {
     string tempFile = "TEMPDATADOESNTEXISTS";
     var    sut      = new FileReaderProvider();
     var    result   = await Assert.
                       ThrowsAnyAsync <IOException>(async() => await sut.ReadFileAsStringAsync(tempFile));
 }
        public async Task TestFileLocked()
        {
            string tempFile = Path.GetTempFileName();

            try
            {
                using FileStream fs = new FileStream(tempFile, FileMode.Open);
                var sut    = new FileReaderProvider();
                var result = await Assert.ThrowsAsync <IOException>(async() => await sut.ReadFileAsStringAsync(tempFile));
            }
            finally
            {
                File.Delete(tempFile);
            }
        }
        public async Task TestFileReadExists(string testText)
        {
            string tempFile = Path.GetTempFileName();

            try
            {
                File.WriteAllText(tempFile, testText);

                var    sut    = new FileReaderProvider();
                string result = await sut.ReadFileAsStringAsync(tempFile);

                Assert.Equal(testText, result);
            }
            finally
            {
                File.Delete(tempFile);
            }
        }