public void if_the_entry_is_not_current_gets_a_new_entry_from_the_engine() { var entry1 = MockRepository.GenerateMock <ISparkViewEntry>(); var entry2 = MockRepository.GenerateMock <ISparkViewEntry>(); entry1.Stub(x => x.IsCurrent()).Return(false); entry2.Stub(x => x.IsCurrent()).Return(true); _engine.Stub(x => x.CreateEntry(_descriptor)).Return(entry1); var result1 = ClassUnderTest.GetViewEntry(_descriptor); _engine.BackToRecord(); _engine.Stub(x => x.CreateEntry(_descriptor)).Return(entry2); _engine.Replay(); var result2 = ClassUnderTest.GetViewEntry(_descriptor); var result3 = ClassUnderTest.GetViewEntry(_descriptor); result1.ShouldEqual(entry1); result2.ShouldEqual(entry2).ShouldEqual(result3); }