public void Load_NullStream_ThrowArgumentNullException() { ExceptionAssert.CatchArgumentNullException(() => { XResourceFile.Load((Stream)null); }, "stream"); }
public void Load_NullFileThrowArgumentNullException() { ExceptionAssert.CatchArgumentNullException(() => { XResourceFile.Load((FileInfo)null); }, "file"); }
public void SaveLoad_Data_AreEqual() { using (var dir = new TemporaryDirectory()) { var resourceFile = new XResourceFile(new List <XResourceFileData>() { new XResourceFileData("key0", "Some value 0"), new XResourceFileData("key1", "1.1", "comment 1.1"), }); var file = dir.CreateFile("SaveLoad_Data_AreEqual.resx"); resourceFile.Save(file); var act = XResourceFile.Load(file); Assert.AreEqual(2, act.Data.Count); } }