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);
        }