Package org.springframework.data.mongodb.core

Examples of org.springframework.data.mongodb.core.AuditablePerson


  }

  @Before
  public void setup() {
    auditablePersonRepository.deleteAll();
    this.auditor = auditablePersonRepository.save(new AuditablePerson("auditor"));
  }
View Full Code Here


  @Test
  public void basicAuditing() {

    doReturn(this.auditor).when(this.auditorAware).getCurrentAuditor();

    AuditablePerson savedUser = auditablePersonRepository.save(new AuditablePerson("user"));

    AuditablePerson createdBy = savedUser.getCreatedBy();

    assertThat(createdBy, is(notNullValue()));
    assertThat(createdBy.getFirstname(), is(this.auditor.getFirstname()));
    assertThat(savedUser.getCreatedAt(), is(notNullValue()));
  }
View Full Code Here

TOP

Related Classes of org.springframework.data.mongodb.core.AuditablePerson

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.