public void Load_ShouldLoadFromFile_WhenExists() { IXmlDocument actual = mSut.Load(); mXmlDoc.Received(1).Load(Filename); Assert.AreSame(mXmlDoc, actual); }
public void Load() { mConfigXml = LoadAndSave.Load(); bool?unrecognizedAppender = Reload(); if (unrecognizedAppender.IsTrue()) { mToastService.ShowWarning("At least one unrecognized appender was found in this configuration."); } }
public void SetUp() { mLoadAndSave = Substitute.For <ICanLoadAndSaveXml>(); mLoadAndSave.Load().Returns(ci => { IXmlDocument xmlDoc = new XmlDocumentWrap(); xmlDoc.Load(GetTestConfigXml()); return(xmlDoc); }); mSut = new SaveIndication(Substitute.For <IToastService>(), mLoadAndSave); }
public void SetUp() { mToastService = Substitute.For <IToastService>(); mXmlDoc = new XmlDocumentWrap(); mXmlDoc.Load(GetTestConfigXml()); mLoadAndSave = Substitute.For <ICanLoadAndSaveXml>(); mLoadAndSave.Load().Returns(mXmlDoc); mSut = new ConfigurationXml(mToastService, mLoadAndSave); }