示例#1
0
        public void TracingTest_WhenPathIsWrong_ShouldThrowexception()
        {
            string       wrongPath = "IAmWrongPath";
            ITraceSource tracing   = new FileTraceSource();

            ((FileTraceSource)tracing).Filepath = wrongPath;
        }
示例#2
0
        public void TracingTest_WhenPathIsCorrect_ShouldBeOk()
        {
            string path = Directory.GetParent(Directory.GetCurrentDirectory()).ToString();
            string root = "Tests";

            while (!(path.Substring(path.Length - root.Length) == root))
            {
                path = path.Remove(path.Length - 1);
            }
            string filename     = "\\TPA.ApplicationArchitecture.dll";
            string xmlName      = "\\test.xml";
            string fullFilePath = path + filename;
            string fullXmlPath  = path + xmlName;

            ITraceSource tracing = new FileTraceSource();

            ((FileTraceSource)tracing).Filepath = fullFilePath;
        }