public void GetCandidateConfigTest()
        {
            Assert.NotNull(XmlLoggingConfiguration.GetCandidateConfigFilePaths());
            var candidateConfigFilePaths = XmlLoggingConfiguration.GetCandidateConfigFilePaths();
            var count = candidateConfigFilePaths.Count();

            Assert.True(count > 0);
        }
        public void GetCandidateConfigTest()
        {
            var candidateConfigFilePaths = XmlLoggingConfiguration.GetCandidateConfigFilePaths();

            Assert.NotNull(candidateConfigFilePaths);
            var count = candidateConfigFilePaths.Count();

            Assert.NotEqual(0, count);
        }
示例#3
0
        public void SetCandidateConfigTest()
        {
            var list = new List<string> { "c:\\global\\temp.config" };
            XmlLoggingConfiguration.SetCandidateConfigFilePaths(list);
            Assert.Single(XmlLoggingConfiguration.GetCandidateConfigFilePaths());
            //no side effects
            list.Add("c:\\global\\temp2.config");
            Assert.Single(XmlLoggingConfiguration.GetCandidateConfigFilePaths());

        }
示例#4
0
        public void ResetCandidateConfigTest()
        {

            var countBefore = XmlLoggingConfiguration.GetCandidateConfigFilePaths().Count();
            var list = new List<string> { "c:\\global\\temp.config" };
            XmlLoggingConfiguration.SetCandidateConfigFilePaths(list);
            Assert.Single(XmlLoggingConfiguration.GetCandidateConfigFilePaths());
            XmlLoggingConfiguration.ResetCandidateConfigFilePath();
            Assert.Equal(countBefore, XmlLoggingConfiguration.GetCandidateConfigFilePaths().Count());

        }
示例#5
0
 public void GetCandidateConfigTest_list_is_readonly()
 {
     Assert.Throws<NotSupportedException>(() =>
     {
         var list = new List<string> { "c:\\global\\temp.config" };
         XmlLoggingConfiguration.SetCandidateConfigFilePaths(list);
         var candidateConfigFilePaths = XmlLoggingConfiguration.GetCandidateConfigFilePaths();
         var list2 = candidateConfigFilePaths as IList;
         list2.Add("test");
     });
 }