Examples of AuditablePerson


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

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

  @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
Copyright © 2018 www.massapi.com. 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.