Exemplo n.º 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();
     }
 }
Exemplo n.º 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);
            }
        }
 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
 }
 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
 }
 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();
 }
 internal void RaiseSpecimenCreated(SpecimenCreatedEventArgs e)
 {
     this.OnSpecimenCreated(e);
 }
Exemplo n.º 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);
     }
 }