Related with this, I’m trying to test the following:
@Test
public void totalOrRatio() {
// given
kit.assignToPerson(account.getAccountOwner());
this.nextRequest();
kit.getRegisteredForPerson().setSex(Sex.Man);
….
}
Where the Kit.getRegisteredForPerson() is cached:
// {{ RegisteredForPerson (property)
@Property(editing = Editing.DISABLED, notPersisted = true)
@MemberOrder(sequence = "1")
public Person getRegisteredForPerson() {
return this.queryResultsCache.execute(new Callable<Person>() {
@Override
public Person call() throws Exception {
return Kit.this.findRegisteredToPerson();
}
}, this.getClass(), "findRegisteredToPerson");
}
// }}
Despite invoking “this.nextRequest()” on the integtest, seems that the cache is
still alive (being it a @RequestScoped service).
Would this also need to be improved for testing @RequestScoped services?
Thanks!
> El 28/5/2015, a las 13:39, GESCONSULTOR - Óscar Bou <[email protected]>
> escribió:
>
> Hi all.
>
> When using FixtureScripts, there can be many actions that, on the real world,
> are execute in different time contexts.
>
> For example, a user creates an Account on the webapp and after that executes
> different actions.
>
> That’s relevant if using the queryResultsCache service (or the new planned
> “@Action” annotation extension) because the results previously created (i.e.,
> the Account) might be available on the cache.
>
> So perhaps some mechanism like the nextTransation() method might be also
> introduced on FixtureScripts.
>
> What do you think?
>
> Regards,
>
> Oscar
>
>
>
>
Óscar Bou Bou
Responsable de Producto
Auditor Jefe de Certificación ISO 27001 en BSI
CISA, CRISC, APMG ISO 20000, ITIL-F
902 900 231 / 620 267 520
http://www.twitter.com/oscarbou <http://www.twitter.com/oscarbou>
http://es.linkedin.com/in/oscarbou <http://es.linkedin.com/in/oscarbou>
http://www.GesConsultor.com <http://www.gesconsultor.com/>
Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen
información reservada que no puede ser difundida. Si usted ha recibido este
correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al
remitente mediante reenvío a su dirección electrónica; no deberá copiar el
mensaje ni divulgar su contenido a ninguna persona.
Su dirección de correo electrónico junto a sus datos personales constan en un
fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener
el contacto con Ud. Si quiere saber de qué información disponemos de Ud.,
modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al
efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección:
Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046 (Madrid), y
Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su
responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan
virus informáticos, y en caso que los tuvieran eliminarlos.