public void LogTest(string content) { string path = Path.GetTempPath() + "\\log.txt"; var file = File.Create(path); file.Close(); var mockIO = new Mock <SystemWrapper.IO.IFileWrap>(); mockIO.Setup(x => x.Open(It.IsNotNull <string>(), FileMode.Open));//.Returns(mockIO.Object.Open(It.IsNotNull<string>(), FileMode.Open)); dangNhapBUS.Log("", path); File.Delete(path); }