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)); }
public void SetUp() { _speedStat = MockRepository.GenerateMock<ISpeedStat>(); _statCollection = MockRepository.GenerateMock<IStatCollection>(); _role = MockRepository.GenerateMock<IRole>(); _statCollectionBuilder = MockRepository.GenerateMock<IStatCollectionBuilder>(); _testObject = new DodgeballPlayer(_role, _statCollectionBuilder); }