Ejemplo n.º 1
0
        public void AddTupleForSqlDependenciesThrowsExceptionIfExists()
        {
            var telemetry      = new DependencyTelemetry();
            var falseTelemetry = new DependencyTelemetry();

            ClientServerDependencyTracker.AddTupleForSqlDependencies(this.sqlRequest, falseTelemetry, false);
            ClientServerDependencyTracker.AddTupleForSqlDependencies(this.sqlRequest, telemetry, false);
        }
Ejemplo n.º 2
0
        public void AddTupleForSqlDependenciesAddsTelemteryTupleToTheTable()
        {
            var telemetry = new DependencyTelemetry();

            ClientServerDependencyTracker.AddTupleForSqlDependencies(this.sqlRequest, telemetry, false);
            var tuple = ClientServerDependencyTracker.GetTupleForSqlDependencies(this.sqlRequest);

            Assert.IsNotNull(tuple);
            Assert.IsNotNull(tuple.Item1);
            Assert.AreEqual(telemetry, tuple.Item1);
        }
Ejemplo n.º 3
0
 public void AddTupleForSqlDependenciesThrowsArgumentNullExceptionForNullTelemetry()
 {
     ClientServerDependencyTracker.AddTupleForSqlDependencies(new SqlCommand("select * from table;"), null, false);
 }
Ejemplo n.º 4
0
 public void AddTupleForSqlDependenciesThrowsArgumentNullExceptionForNullSqlRequest()
 {
     ClientServerDependencyTracker.AddTupleForSqlDependencies(null, new DependencyTelemetry(), false);
 }