Exemple #1
0
    public void WriteLog_Database()
    {
        String strErrorResut = String.Empty;
        try
        {
            Fwk.Logging.Event s = new Fwk.Logging.Event(Fwk.Logging.EventType.Information, "test", "testing fwk.logging");
            
            Fwk.Logging.StaticLogger.Log(s);
            
            s = new Fwk.Logging.Event( Fwk.Logging.EventType.Error, "test", "testing fwk.logging");
            s.AppId = "unit test ";
 
            Fwk.Logging.StaticLogger.Log( Fwk.Logging.Targets.TargetType.Database,s,null,"test1");
        }
        catch (Exception e)
        {
            strErrorResut = Fwk.Exceptions.ExceptionHelper.GetAllMessageException(e);
        }
        Assert.AreEqual<String>(strErrorResut, string.Empty, strErrorResut);
    }
Exemple #2
0
        public void WriteLog_Database()
        {
            String strErrorResut = String.Empty;

            try
            {
                Fwk.Logging.Event s = new Fwk.Logging.Event(Fwk.Logging.EventType.Information, "test", "testing fwk.logging");

                Fwk.Logging.StaticLogger.Log(s);

                s       = new Fwk.Logging.Event(Fwk.Logging.EventType.Error, "test", "testing fwk.logging");
                s.AppId = "unit test ";

                Fwk.Logging.StaticLogger.Log(Fwk.Logging.Targets.TargetType.Database, s, null, "test1");
            }
            catch (Exception e)
            {
                strErrorResut = Fwk.Exceptions.ExceptionHelper.GetAllMessageException(e);
            }
            Assert.AreEqual <String>(strErrorResut, string.Empty, strErrorResut);
        }