public void Should_ignore_non_auditable_entities()
		{
			var userSession = S<IUserSession>();
			var currentUser = new User();
			userSession.Stub(us => us.GetCurrentUser()).Return(currentUser);

			var testEntity = S<PersistentObject>();

			var interceptor = new ChangeAuditInfoInterceptor(userSession, null);

			interceptor.OnSave(testEntity, null, new[] {new ChangeAuditInfo()}, new[] {"ChangeAuditInfo"}, null);
			interceptor.OnFlushDirty(testEntity, null, new[] {new ChangeAuditInfo()}, null, new[] {"ChangeAuditInfo"}, null);
		}
		public void Should_tag_created_and_updated_info_when_no_created_date_exists()
		{
			var userSession = S<IUserSession>();
			var currentUser = new User {Username = "******"};
			userSession.Stub(us => us.GetCurrentUser()).Return(currentUser);

			var conference = new Conference();

			var interceptor = new ChangeAuditInfoInterceptor(userSession, new Clock(new DateTime(2008, 10, 20)));

			interceptor.OnSave(conference, null, new[] {new ChangeAuditInfo()}, new[] {"ChangeAuditInfo"}, null);

			conference.ChangeAuditInfo.Created.ShouldEqual(new DateTime(2008, 10, 20));
			conference.ChangeAuditInfo.CreatedBy.ShouldEqual(currentUser.Username);
			conference.ChangeAuditInfo.Updated.ShouldEqual(new DateTime(2008, 10, 20));
			conference.ChangeAuditInfo.UpdatedBy.ShouldEqual(currentUser.Username);
		}