public void IsUpToDate_FriendsListOutOfDate_ReturnsCorrect() { // PREPARE THE TEST // setup the default mocks MockRepository mocks = new MockRepository(); var target = new FriendsList() { Friends = new List<UserElement> { new UserElement() { user = UserTest.CreateTestUser() } } }; var reader = mocks.DynamicMock<IDnaDataReader>(); reader.Stub(x => x.HasRows).Return(true); reader.Stub(x => x.Read()).Return(false); var creator = mocks.DynamicMock<IDnaDataReaderCreator>(); mocks.ReplayAll(); Assert.AreEqual(false, target.IsUpToDate(creator)); }