use of pcgen.cdom.content.fact.FactDefinition in project pcgen by PCGen.
the class FactIntegrationTest method setUp.
@Override
public void setUp() throws PersistenceLayerException, URISyntaxException {
TokenRegistration.clearTokens();
super.setUp();
cd = new FactDefinition();
cd.setDisplayName(PROP_1);
cd.setFormatManager(STRING_MGR);
cd.setName(PROP_1);
cd.setFactName(PROP_1);
cd.setUsableLocation(PCTemplate.class);
cd.setVisibility(Visibility.DEFAULT);
primaryContext.getReferenceContext().importObject(cd);
SourceFileLoader.processFactDefinitions(primaryContext);
secondaryContext.getReferenceContext().importObject(cd);
SourceFileLoader.processFactDefinitions(secondaryContext);
}
use of pcgen.cdom.content.fact.FactDefinition in project pcgen by PCGen.
the class BuildUtilities method createFact.
public static FactDefinition<?, String> createFact(LoadContext context, String factname, Class<? extends Loadable> cls) {
FactDefinition<?, String> fd = new FactDefinition<>();
fd.setUsableLocation(cls);
fd.setName("*" + factname);
fd.setFactName(factname);
fd.setFormatManager(new StringManager());
context.getReferenceContext().importObject(fd);
return fd;
}
use of pcgen.cdom.content.fact.FactDefinition in project pcgen by PCGen.
the class FactLstTest method setUp.
@Override
public void setUp() throws PersistenceLayerException, URISyntaxException {
TokenRegistration.clearTokens();
super.setUp();
FactDefinition fd = new FactDefinition();
fd.setName("DOMAIN.Possibility");
fd.setFactName("Possibility");
fd.setUsableLocation(Domain.class);
fd.setFormatManager(new StringManager());
fd.setVisibility(Visibility.HIDDEN);
primaryContext.getReferenceContext().importObject(fd);
secondaryContext.getReferenceContext().importObject(fd);
SourceFileLoader.processFactDefinitions(primaryContext);
SourceFileLoader.processFactDefinitions(secondaryContext);
}
use of pcgen.cdom.content.fact.FactDefinition in project pcgen by PCGen.
the class DataTypeTokenTest method resetContext.
protected void resetContext() {
URI testURI = testCampaign.getURI();
context = new RuntimeLoadContext(new RuntimeReferenceContext(), new ConsolidatedListCommitStrategy());
context.setSourceURI(testURI);
context.setExtractURI(testURI);
cd = new FactDefinition();
}
use of pcgen.cdom.content.fact.FactDefinition in project pcgen by PCGen.
the class ExplanationTokenTest method resetContext.
protected void resetContext() {
URI testURI = testCampaign.getURI();
context = new RuntimeLoadContext(new RuntimeReferenceContext(), new ConsolidatedListCommitStrategy());
context.setSourceURI(testURI);
context.setExtractURI(testURI);
cd = new FactDefinition();
}
Aggregations