コード例 #1
0
 private void OnSpecimenCreated(object sender, SpecimenCreatedEventArgs e)
 {
     // Keep the final NoSpecimen in the list, even though we're about to throw
     if (!(e.Specimen is NoSpecimen))
     {
         GetPathForCurrentThread().Pop();
     }
 }
コード例 #2
0
        /// <summary>
        /// Raises the <see cref="SpecimenCreated"/> event.
        /// </summary>
        /// <param name="e">The event arguments for the event.</param>
        protected virtual void OnSpecimenCreated(SpecimenCreatedEventArgs e)
        {
            EventHandler <SpecimenCreatedEventArgs> handler = this.SpecimenCreated;

            if (handler != null)
            {
                handler(this, e);
            }
        }
コード例 #3
0
 public void SutIsSpecimenTraceEventArgs()
 {
     // Fixture setup
     var dummyRequest = new object();
     var dummySpecimen = new object();
     var dummyDepth = 0;
     // Exercise system
     var sut = new SpecimenCreatedEventArgs(dummyRequest, dummySpecimen, dummyDepth);
     // Verify outcome
     Assert.IsAssignableFrom<RequestTraceEventArgs>(sut);
     // Teardown
 }
コード例 #4
0
 public void SpecimenMatchesConstructorArgument()
 {
     // Fixture setup
     var dummyRequest = new object();
     var expectedSpecimen = new object();
     var dummyDepth = 0;
     var sut = new SpecimenCreatedEventArgs(dummyRequest, expectedSpecimen, dummyDepth);
     // Exercise system
     object result = sut.Specimen;
     // Verify outcome
     Assert.Equal(expectedSpecimen, result);
     // Teardown
 }
コード例 #5
0
 private void OnSpecimenCreated(object sender, SpecimenCreatedEventArgs e)
 {
     // Keep the final NoSpecimen in the list, even though we're about to throw
     if (!(e.Specimen is NoSpecimen))
         GetPathForCurrentThread().Pop();
 }
コード例 #6
0
 internal void RaiseSpecimenCreated(SpecimenCreatedEventArgs e)
 {
     this.OnSpecimenCreated(e);
 }
コード例 #7
0
 /// <summary>
 /// Raises the <see cref="SpecimenCreated"/> event.
 /// </summary>
 /// <param name="e">The event arguments for the event.</param>
 protected virtual void OnSpecimenCreated(SpecimenCreatedEventArgs e)
 {
     EventHandler<SpecimenCreatedEventArgs> handler = this.SpecimenCreated;
     if (handler != null)
     {
         handler(this, e);
     }
 }