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)
 
SpellInfoBuilderWithEffectMiscValue (uint8 effIndex, int32 miscValue)
 
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
166: _entryHelper() {}
TestSpellEntryHelper _entryHelper
Definition SpellInfoTestHelper.h:272

Member Function Documentation

◆ Build()

SpellInfo * SpellInfoBuilder::Build ( )
inline
261 {
262 return new SpellInfo(_entryHelper.Get());
263 }
Definition SpellInfo.h:340
SpellEntry const * Get() const
Definition SpellInfoTestHelper.h:148

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
267 {
268 return std::unique_ptr<SpellInfo>(new SpellInfo(_entryHelper.Get()));
269 }

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
253 {
255 return *this;
256 }
TestSpellEntryHelper & WithAttributes(uint32 attr)
Definition SpellInfoTestHelper.h:142

References _entryHelper, and TestSpellEntryHelper::WithAttributes().

Referenced by TEST_F().

◆ WithAttributesEx3()

SpellInfoBuilder & SpellInfoBuilder::WithAttributesEx3 ( uint32  attr)
inline
217 {
219 return *this;
220 }
TestSpellEntryHelper & WithAttributesEx3(uint32 attr)
Definition SpellInfoTestHelper.h:96

References _entryHelper, and TestSpellEntryHelper::WithAttributesEx3().

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

◆ WithDmgClass()

SpellInfoBuilder & SpellInfoBuilder::WithDmgClass ( uint32  dmgClass)
inline
211 {
212 _entryHelper.WithDmgClass(dmgClass);
213 return *this;
214 }
TestSpellEntryHelper & WithDmgClass(uint32 dmgClass)
Definition SpellInfoTestHelper.h:90

References _entryHelper, and TestSpellEntryHelper::WithDmgClass().

◆ WithEffect()

SpellInfoBuilder & SpellInfoBuilder::WithEffect ( uint8  effIndex,
uint32  effect,
uint32  auraType = 0 
)
inline
223 {
224 _entryHelper.WithEffect(effIndex, effect, auraType);
225 return *this;
226 }
TestSpellEntryHelper & WithEffect(uint8 effIndex, uint32 effect, uint32 auraType=0)
Definition SpellInfoTestHelper.h:102

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
235 {
236 _entryHelper.WithEffectBasePoints(effIndex, basePoints);
237 return *this;
238 }
TestSpellEntryHelper & WithEffectBasePoints(uint8 effIndex, int32 basePoints)
Definition SpellInfoTestHelper.h:121

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
247 {
248 _entryHelper.WithEffectDieSides(effIndex, dieSides);
249 return *this;
250 }
TestSpellEntryHelper & WithEffectDieSides(uint8 effIndex, int32 dieSides)
Definition SpellInfoTestHelper.h:135

References _entryHelper, and TestSpellEntryHelper::WithEffectDieSides().

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

◆ WithEffectMiscValue()

SpellInfoBuilder & SpellInfoBuilder::WithEffectMiscValue ( uint8  effIndex,
int32  miscValue 
)
inline
241 {
242 _entryHelper.WithEffectMiscValue(effIndex, miscValue);
243 return *this;
244 }
TestSpellEntryHelper & WithEffectMiscValue(uint8 effIndex, int32 miscValue)
Definition SpellInfoTestHelper.h:128

References _entryHelper, and TestSpellEntryHelper::WithEffectMiscValue().

◆ WithEffectTriggerSpell()

SpellInfoBuilder & SpellInfoBuilder::WithEffectTriggerSpell ( uint8  effIndex,
uint32  triggerSpell 
)
inline
229 {
230 _entryHelper.WithEffectTriggerSpell(effIndex, triggerSpell);
231 return *this;
232 }
TestSpellEntryHelper & WithEffectTriggerSpell(uint8 effIndex, uint32 triggerSpell)
Definition SpellInfoTestHelper.h:112

References _entryHelper, and TestSpellEntryHelper::WithEffectTriggerSpell().

◆ WithId()

◆ WithProcChance()

SpellInfoBuilder & SpellInfoBuilder::WithProcChance ( uint32  procChance)
inline
199 {
200 _entryHelper.WithProcChance(procChance);
201 return *this;
202 }
TestSpellEntryHelper & WithProcChance(uint32 procChance)
Definition SpellInfoTestHelper.h:78

References _entryHelper, and TestSpellEntryHelper::WithProcChance().

◆ WithProcCharges()

SpellInfoBuilder & SpellInfoBuilder::WithProcCharges ( uint32  procCharges)
inline
205 {
206 _entryHelper.WithProcCharges(procCharges);
207 return *this;
208 }
TestSpellEntryHelper & WithProcCharges(uint32 procCharges)
Definition SpellInfoTestHelper.h:84

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
193 {
194 _entryHelper.WithProcFlags(procFlags);
195 return *this;
196 }
TestSpellEntryHelper & WithProcFlags(uint32 procFlags)
Definition SpellInfoTestHelper.h:72

References _entryHelper, and TestSpellEntryHelper::WithProcFlags().

Referenced by TEST_F().

◆ WithSchoolMask()

SpellInfoBuilder & SpellInfoBuilder::WithSchoolMask ( uint32  schoolMask)
inline
187 {
188 _entryHelper.WithSchoolMask(schoolMask);
189 return *this;
190 }
TestSpellEntryHelper & WithSchoolMask(uint32 schoolMask)
Definition SpellInfoTestHelper.h:66

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
181 {
182 _entryHelper.WithSpellFamilyFlags(flag0, flag1, flag2);
183 return *this;
184 }
TestSpellEntryHelper & WithSpellFamilyFlags(uint32 flag0, uint32 flag1=0, uint32 flag2=0)
Definition SpellInfoTestHelper.h:58

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: