public IStatCollection BuildStatCollection(IRole role) { var statCollection = new StatCollection() { Strength = new StrengthStat(role.BaseStrength), Accuracy = new AccuracyStat(role.BaseAccuracy), Dodge = new DodgeStat(role.BaseDodge), Catch = new CatchStat(role.BaseCatch), Speed = new SpeedStat(role.BaseSpeed), Endurance = new EnduranceStat(role.BaseEndurance), }; return statCollection; }
public void Constructor_Uses_StatCollectionBuilder_To_Set_Up_StatsCollection() { var statCollection = new StatCollection(); _statCollectionBuilder.Expect(s => s.BuildStatCollection(_role)).Return(statCollection); var testObject = new DodgeballPlayer(_role, _statCollectionBuilder); Assert.That(testObject.Stats, Is.SameAs(statCollection)); }