Beispiel #1
0
        public void TraceLoggerPropertyTest()
        {
            SharePointLogger logger = new SharePointLogger();

            try
            {
                ITraceLogger iTLogger = logger.TraceLogger;
                TraceLogger  tlogger  = new TraceLogger();
                if (!iTLogger.GetType().IsInterface)
                {
                    if (iTLogger.GetType().ToString() == tlogger.GetType().ToString())
                    {
                        Assert.IsTrue(true);
                    }
                    else
                    {
                        Assert.Fail("There is a type mismatch");
                    }
                }
                else
                {
                    Assert.Fail("Interface was returned");
                }
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.Message);
            }
        }
Beispiel #2
0
        public void TraceLoggerPropertyTest()
        {
            SharePointLogger logger   = new SharePointLogger();
            ITraceLogger     iTLogger = logger.TraceLogger;
            TraceLogger      tlogger  = new TraceLogger();

            Assert.AreEqual(iTLogger.GetType(), tlogger.GetType());

            logger   = null;
            iTLogger = null;
            tlogger  = null;
        }