@Test(enabled = false, description = "This should be executed manually in IDE")
@SlowTest
@PerformanceProfiling
// ideally change persistence.xml to use a local mysql database and monitor general log etc.
public void transferFromResource() {
HLocale locale = EntityMakerBuilder.builder().addConstructorParameterMaker(HLocale.class, 0, FixedValueMaker.fix(LocaleId.ES)).build()
.makeAndPersist(getEm(), HLocale.class);
HProjectIteration iteration =
EntityMakerBuilder
.builder()
.addFieldOrPropertyMaker(
HProject.class, "sourceViewURL",
FixedValueMaker.EMPTY_STRING_MAKER).build()
.makeAndPersist(getEm(),
HProjectIteration.class);
Resource from = new Resource("message");
from.setContentType(ContentType.PO);
LocaleId localeId = locale.getLocaleId();
// adjust this number to suit testing purpose
int numOfTextFlows = 50;
for (int i = 0; i < numOfTextFlows; i++) {
addSampleTextFlow(from, localeId, i);
}