public void Load_ShouldLoadFromFile_WhenExists()
        {
            IXmlDocument actual = mSut.Load();

            mXmlDoc.Received(1).Load(Filename);

            Assert.AreSame(mXmlDoc, actual);
        }
예제 #2
0
        public void Load()
        {
            mConfigXml = LoadAndSave.Load();

            bool?unrecognizedAppender = Reload();

            if (unrecognizedAppender.IsTrue())
            {
                mToastService.ShowWarning("At least one unrecognized appender was found in this configuration.");
            }
        }
예제 #3
0
        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);
        }
예제 #4
0
        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);
        }