MCPcopy Create free account
hub / github.com/PCGen/pcgen / makeRace

Method makeRace

code/src/test/pcgen/util/TestHelper.java:342–354  ·  view source on GitHub ↗

Set the important info about a Race @param name The race name @return The race (which has also been added to global storage)

(final String name)

Source from the content-addressed store, hash-verified

340 * @return The race (which has also been added to global storage)
341 */
342 public static Race makeRace(final String name)
343 {
344 final Race aRace = new Race();
345 aRace.setName(name);
346 aRace.put(StringKey.KEY_NAME, ("KEY_" + name));
347
348 LoadContext context = Globals.getContext();
349 final BonusObj bon = Bonus.newBonus(context, "FEAT|POOL|1");
350 aRace.addToListFor(ListKey.BONUS, bon);
351
352 context.getReferenceContext().importObject(aRace);
353 return aRace;
354 }
355
356 /**
357 * Set the important info about a Class

Callers 2

setUpMethod · 0.95
testJepIfMethod · 0.95

Calls 7

getContextMethod · 0.95
newBonusMethod · 0.95
getReferenceContextMethod · 0.95
importObjectMethod · 0.80
setNameMethod · 0.65
putMethod · 0.65
addToListForMethod · 0.65

Tested by

no test coverage detected