AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
SpellInfoBuilder Class Reference

Builder class for creating SpellInfo test instances. More...

#include "SpellInfoTestHelper.h"

Public Member Functions

 SpellInfoBuilder ()
 
SpellInfoBuilderWithId (uint32 id)
 
SpellInfoBuilderWithSpellFamilyName (uint32 familyName)
 
SpellInfoBuilderWithSpellFamilyFlags (uint32 flag0, uint32 flag1=0, uint32 flag2=0)
 
SpellInfoBuilderWithSchoolMask (uint32 schoolMask)
 
SpellInfoBuilderWithProcFlags (uint32 procFlags)
 
SpellInfoBuilderWithProcChance (uint32 procChance)
 
SpellInfoBuilderWithProcCharges (uint32 procCharges)
 
SpellInfoBuilderWithDmgClass (uint32 dmgClass)
 
SpellInfoBuilderWithAttributesEx3 (uint32 attr)
 
SpellInfoBuilderWithEffect (uint8 effIndex, uint32 effect, uint32 auraType=0)
 
SpellInfoBuilderWithEffectTriggerSpell (uint8 effIndex, uint32 triggerSpell)
 
SpellInfoBuilderWithEffectBasePoints (uint8 effIndex, int32 basePoints)
 
SpellInfoBuilderWithEffectDieSides (uint8 effIndex, int32 dieSides)
 
SpellInfoBuilderWithAttributes (uint32 attr)
 
SpellInfoBuild ()
 
std::unique_ptr< SpellInfoBuildUnique ()
 

Private Attributes

TestSpellEntryHelper _entryHelper
 

Detailed Description

Builder class for creating SpellInfo test instances.

This helper allows easy construction of SpellInfo objects for unit testing without requiring DBC data.

Constructor & Destructor Documentation

◆ SpellInfoBuilder()

SpellInfoBuilder::SpellInfoBuilder ( )
inline
162: _entryHelper() {}
TestSpellEntryHelper _entryHelper
Definition SpellInfoTestHelper.h:262

Member Function Documentation

◆ Build()

SpellInfo * SpellInfoBuilder::Build ( )
inline
251 {
252 return new SpellInfo(_entryHelper.Get());
253 }
Definition SpellInfo.h:340
SpellEntry const * Get() const
Definition SpellInfoTestHelper.h:144

References _entryHelper, and TestSpellEntryHelper::Get().

Referenced by SpellProcTest::CreateSpellInfo(), AuraScriptProcTestFixture::CreateSpellInfo(), SpellProcDatabaseTest::SetUp(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ BuildUnique()

std::unique_ptr< SpellInfo > SpellInfoBuilder::BuildUnique ( )
inline
257 {
258 return std::unique_ptr<SpellInfo>(new SpellInfo(_entryHelper.Get()));
259 }

References _entryHelper, and TestSpellEntryHelper::Get().

Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ WithAttributes()

SpellInfoBuilder & SpellInfoBuilder::WithAttributes ( uint32  attr)
inline
243 {
245 return *this;
246 }
TestSpellEntryHelper & WithAttributes(uint32 attr)
Definition SpellInfoTestHelper.h:138

References _entryHelper, and TestSpellEntryHelper::WithAttributes().

Referenced by TEST_F().

◆ WithAttributesEx3()

SpellInfoBuilder & SpellInfoBuilder::WithAttributesEx3 ( uint32  attr)
inline
213 {
215 return *this;
216 }
TestSpellEntryHelper & WithAttributesEx3(uint32 attr)
Definition SpellInfoTestHelper.h:99

References _entryHelper, and TestSpellEntryHelper::WithAttributesEx3().

Referenced by TEST_F(), TEST_F(), TEST_F(), and TEST_P().

◆ WithDmgClass()

SpellInfoBuilder & SpellInfoBuilder::WithDmgClass ( uint32  dmgClass)
inline
207 {
208 _entryHelper.WithDmgClass(dmgClass);
209 return *this;
210 }
TestSpellEntryHelper & WithDmgClass(uint32 dmgClass)
Definition SpellInfoTestHelper.h:93

References _entryHelper, and TestSpellEntryHelper::WithDmgClass().

◆ WithEffect()

SpellInfoBuilder & SpellInfoBuilder::WithEffect ( uint8  effIndex,
uint32  effect,
uint32  auraType = 0 
)
inline
219 {
220 _entryHelper.WithEffect(effIndex, effect, auraType);
221 return *this;
222 }
TestSpellEntryHelper & WithEffect(uint8 effIndex, uint32 effect, uint32 auraType=0)
Definition SpellInfoTestHelper.h:105

References _entryHelper, and TestSpellEntryHelper::WithEffect().

Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ WithEffectBasePoints()

SpellInfoBuilder & SpellInfoBuilder::WithEffectBasePoints ( uint8  effIndex,
int32  basePoints 
)
inline
231 {
232 _entryHelper.WithEffectBasePoints(effIndex, basePoints);
233 return *this;
234 }
TestSpellEntryHelper & WithEffectBasePoints(uint8 effIndex, int32 basePoints)
Definition SpellInfoTestHelper.h:124

References _entryHelper, and TestSpellEntryHelper::WithEffectBasePoints().

Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ WithEffectDieSides()

SpellInfoBuilder & SpellInfoBuilder::WithEffectDieSides ( uint8  effIndex,
int32  dieSides 
)
inline
237 {
238 _entryHelper.WithEffectDieSides(effIndex, dieSides);
239 return *this;
240 }
TestSpellEntryHelper & WithEffectDieSides(uint8 effIndex, int32 dieSides)
Definition SpellInfoTestHelper.h:131

References _entryHelper, and TestSpellEntryHelper::WithEffectDieSides().

Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ WithEffectTriggerSpell()

SpellInfoBuilder & SpellInfoBuilder::WithEffectTriggerSpell ( uint8  effIndex,
uint32  triggerSpell 
)
inline
225 {
226 _entryHelper.WithEffectTriggerSpell(effIndex, triggerSpell);
227 return *this;
228 }
TestSpellEntryHelper & WithEffectTriggerSpell(uint8 effIndex, uint32 triggerSpell)
Definition SpellInfoTestHelper.h:115

References _entryHelper, and TestSpellEntryHelper::WithEffectTriggerSpell().

◆ WithId()

◆ WithProcChance()

SpellInfoBuilder & SpellInfoBuilder::WithProcChance ( uint32  procChance)
inline
195 {
196 _entryHelper.WithProcChance(procChance);
197 return *this;
198 }
TestSpellEntryHelper & WithProcChance(uint32 procChance)
Definition SpellInfoTestHelper.h:81

References _entryHelper, and TestSpellEntryHelper::WithProcChance().

◆ WithProcCharges()

SpellInfoBuilder & SpellInfoBuilder::WithProcCharges ( uint32  procCharges)
inline
201 {
202 _entryHelper.WithProcCharges(procCharges);
203 return *this;
204 }
TestSpellEntryHelper & WithProcCharges(uint32 procCharges)
Definition SpellInfoTestHelper.h:87

References _entryHelper, and TestSpellEntryHelper::WithProcCharges().

Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ WithProcFlags()

SpellInfoBuilder & SpellInfoBuilder::WithProcFlags ( uint32  procFlags)
inline
189 {
190 _entryHelper.WithProcFlags(procFlags);
191 return *this;
192 }
TestSpellEntryHelper & WithProcFlags(uint32 procFlags)
Definition SpellInfoTestHelper.h:75

References _entryHelper, and TestSpellEntryHelper::WithProcFlags().

Referenced by TEST_F().

◆ WithSchoolMask()

SpellInfoBuilder & SpellInfoBuilder::WithSchoolMask ( uint32  schoolMask)
inline
183 {
184 _entryHelper.WithSchoolMask(schoolMask);
185 return *this;
186 }
TestSpellEntryHelper & WithSchoolMask(uint32 schoolMask)
Definition SpellInfoTestHelper.h:69

References _entryHelper, and TestSpellEntryHelper::WithSchoolMask().

Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ WithSpellFamilyFlags()

SpellInfoBuilder & SpellInfoBuilder::WithSpellFamilyFlags ( uint32  flag0,
uint32  flag1 = 0,
uint32  flag2 = 0 
)
inline
177 {
178 _entryHelper.WithSpellFamilyFlags(flag0, flag1, flag2);
179 return *this;
180 }
TestSpellEntryHelper & WithSpellFamilyFlags(uint32 flag0, uint32 flag1=0, uint32 flag2=0)
Definition SpellInfoTestHelper.h:61

References _entryHelper, and TestSpellEntryHelper::WithSpellFamilyFlags().

Referenced by SpellProcTest::CreateSpellInfo(), AuraScriptProcTestFixture::CreateSpellInfo(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ WithSpellFamilyName()

SpellInfoBuilder & SpellInfoBuilder::WithSpellFamilyName ( uint32  familyName)
inline

Member Data Documentation

◆ _entryHelper


The documentation for this class was generated from the following file: