Beispiel #1
0
		public void bookmark_valid_owner_null_change_null_transientEntities_iChangeTrackingService_ctor_valid_transientEntities()
		{
			IChangeTrackingService mock = MockRepository.GenerateStub<IChangeTrackingService>();
			Bookmark bmk = new Bookmark( mock, ( IChange )null, ( IEnumerable<Object> )null );

			bmk.TransientEntities.Should().Not.Be.Null();
			bmk.TransientEntities.Count().Should().Be.EqualTo( 0 );
		}
Beispiel #2
0
		public void bookmark_valid_owner_valid_iChange_valid_transientEntities_iChangeTrackingService_ctor()
		{
			IChangeTrackingService owner = MockRepository.GenerateStub<IChangeTrackingService>();
			IChange expected = MockRepository.GenerateStub<IChange>();

			Object[] entities = new Object[] { new Object(), new Object() };

			Bookmark bmk = new Bookmark( owner, expected, entities );

			bmk.Position.Should().Be.EqualTo( expected );
			bmk.TransientEntities.Should().Not.Be.Null();
			bmk.TransientEntities.Should().Have.SameSequenceAs( entities );
		}
Beispiel #3
0
		public void bookmark_valid_owner_null_iChange_valid_transientEntities_iChangeTrackingService_ctor()
		{
			IChangeTrackingService mock = MockRepository.GenerateStub<IChangeTrackingService>();
			Bookmark bmk = new Bookmark( mock, ( IChange )null, new Object[ 0 ] );

			bmk.Position.Should().Be.Null();
		}
Beispiel #4
0
		public void bookmark_null_owner__null_change_null_transientEntities_iChangeTrackingService_ctor_raise_argumentNullException_on_owner()
		{
			Bookmark bmk = new Bookmark( ( IChangeTrackingService )null, ( IChange )null, ( IEnumerable<Object> )null );
		}