コード例 #1
0
        public static void MyClassInitialize(TestContext testContext)
        {
            Aspx451TestWebApplication = new IISTestWebApplication
            {
                AppName = "Aspx451",
                Port    = DeploymentAndValidationTools.Aspx451Port,
            };
            DeploymentAndValidationTools.Initialize();

            LocalDb.CreateLocalDb("RDDTestDatabase", Aspx451TestWebApplication.AppFolder + "\\TestDatabase.sql");

            Aspx451TestWebApplication.Deploy();
            Trace.TraceInformation("IIS Restart begin.");
            Iis.Reset();
            Trace.TraceInformation("IIS Restart end.");
            Trace.TraceInformation("SQlTests class initialized");
        }
コード例 #2
0
        private void Validate(TelemetryItem <RemoteDependencyData> itemToValidate,
                              string targetExpected,
                              string commandNameExpected,
                              TimeSpan accessTimeMax,
                              bool successFlagExpected,
                              string sqlErrorCodeExpected,
                              string sqlErrorMessageExpected)
        {
            // For http name is validated in test itself
            Assert.IsTrue(itemToValidate.data.baseData.target.Contains(targetExpected),
                          "The remote dependancy target is incorrect. Expected: " + targetExpected +
                          ". Collected: " + itemToValidate.data.baseData.target);

            Assert.AreEqual(sqlErrorCodeExpected, itemToValidate.data.baseData.resultCode);

            //If the command name is expected to be empty, the deserializer will make the CommandName null
            if ("rddp" == DeploymentAndValidationTools.ExpectedSDKPrefix)
            {
                // Additional checks for profiler collection
                if (!string.IsNullOrEmpty(sqlErrorMessageExpected))
                {
                    Assert.AreEqual(sqlErrorMessageExpected, itemToValidate.data.baseData.properties["ErrorMessage"]);
                }

                if (string.IsNullOrEmpty(commandNameExpected))
                {
                    Assert.IsNull(itemToValidate.data.baseData.data);
                }
                else
                {
                    Assert.IsTrue(itemToValidate.data.baseData.data.Equals(commandNameExpected), "The command name is incorrect");
                }
            }

            DeploymentAndValidationTools.Validate(itemToValidate, accessTimeMax, successFlagExpected, sqlErrorCodeExpected);
        }
コード例 #3
0
 public static void MyClassCleanup()
 {
     DeploymentAndValidationTools.CleanUp();
     Trace.TraceInformation("Aspnet core HttpTests class cleaned up");
     AspxCoreTestWebApplication.Remove();
 }
コード例 #4
0
        public static void MyClassCleanup()
        {
            AzureStorageHelper.Cleanup();

            DeploymentAndValidationTools.CleanUp();
        }
コード例 #5
0
        public static void MyClassInitialize(TestContext testContext)
        {
            DeploymentAndValidationTools.Initialize();

            AzureStorageHelper.Initialize();
        }
コード例 #6
0
 public static void MyClassCleanup()
 {
     DeploymentAndValidationTools.CleanUp();
 }
コード例 #7
0
        public static void MyClassInitialize(TestContext testContext)
        {
            DeploymentAndValidationTools.Initialize();

            LocalDb.CreateLocalDb("RDDTestDatabase", DeploymentAndValidationTools.Aspx451TestWebApplication.AppFolder + "\\TestDatabase.sql");
        }