public void after_suspend_cannot_call_UnregisterTransient()
        {
            ChangeTrackingService svc = new ChangeTrackingService();

            Person p = new Person( svc );

            svc.Suspend();
            svc.UnregisterTransient( p );
        }
        public void service_on_unregisterTransient_raise_trackingServiceStateChanged_event()
        {
            Int32 expected = 1;
            Int32 actual = 0;

            ChangeTrackingService svc = new ChangeTrackingService();
            Person p = new Person( svc );

            svc.TrackingServiceStateChanged += ( sender, args ) => { actual++; };
            svc.UnregisterTransient( p );

            Assert.AreEqual<Int32>( expected, actual );
        }
        public void service_unregisterTransient_valid_reference()
        {
            ChangeTrackingService svc = new ChangeTrackingService();
            EntityTrackingStates expected = EntityTrackingStates.None;

            Person p = new Person( svc, true );
            svc.UnregisterTransient( p );
            EntityTrackingStates actual = svc.GetEntityState( p );

            Assert.AreEqual<EntityTrackingStates>( expected, actual );
        }
        public void service_unregisterTransient_reference_not_registered_as_transient()
        {
            Person p = new Person( null );

            ChangeTrackingService svc = new ChangeTrackingService();
            svc.UnregisterTransient( p );
        }
 public void service_unregisterTransient_null_reference_argumentNullException()
 {
     ChangeTrackingService svc = new ChangeTrackingService();
     svc.UnregisterTransient( null );
 }