public void IsFileNullOrEmpty_Return_False_If_New_Create_File_WithText() { sut = new FileWrapper(new FileHelper()); using (StreamWriter writer = File.CreateText(fileName)) { writer.WriteLine("Hello, World!"); writer.Flush(); } Assert.IsFalse(sut.IsFileNullOrEmpty(fileName)); }
public void Shim_Static_IsFileNullOrEmpty_Return_False_If_New_Create_File_WithText() { sut = new FileWrapper(new FileHelper()); using (ShimsContext.Create()) { ShimFileHelper.IsNullOrEmptyString = name => false; Assert.IsFalse(sut.IsFileNullOrEmpty(fileName)); } }