Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there a way to conditionally exclude a test?
Message
 
 
À
07/03/2013 16:41:14
Information générale
Forum:
ASP.NET
Catégorie:
Test et débogage
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01567786
Message ID:
01567812
Vues:
37
This is what base class has:
[TestClass]
   public abstract class UnitTestBase
   {
      public static IniFile iniFile, systemIniFile;
      public static MiddlewareMain middlewareMain;
      public static Boolean isClassInitialized = false;

      [ClassInitialize] // Runs only once before all tests.
      public static void ClassInit(TestContext context)
      {
         AppInfo.ModuleName = "Middleware";

         if (null == systemIniFile)
            systemIniFile = new SystemIni();
         if (null == iniFile)
            iniFile = new LocalIni();
         if (null == middlewareMain || !isClassInitialized)
         {
                     database.CreateDatabaseConnection();
            middlewareMain                   = new MiddlewareMain(database, application);            
            middlewareMain.Rollback          = true;
         }
         isClassInitialized = true;
      }

      [TestInitialize] // TestInitialize runs multiple times before each test.
      public void TestInit()
      {
         if (!isClassInitialized)
            ClassInit(null);
      }
   }
>Here does middleware get instantiated?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform