public void WriteAllBytesTest() { var path = @"z:\temp\aaa.txt"; var text = "あいうえお"; var encoding = Encoding.GetEncoding("shift-jis"); var file = new FileEmu(); file.WriteAllBytes(path, encoding.GetBytes(text)); Assert.AreEqual(text, file.ReadAllText(path, encoding)); }