public void ExecuteOnQuestWithoutChildrenTest(bool beforeCommandResult) { //Arrange Quest quest = QuestHelper.CreateQuest(); IQuestCommand beforeQuestCommanduestCommand = MockRepository.GenerateStrictMock <IQuestCommand>(); beforeQuestCommanduestCommand.Expect(bqc => bqc.Execute(Arg <Quest> .Is.Equal(quest))) .Repeat.Once() .Return(beforeCommandResult); IQuestCommand afterQuestCommand = MockRepository.GenerateStrictMock <IQuestCommand>(); afterQuestCommand.Expect(aqc => aqc.Execute(Arg <Quest> .Is.Equal(quest))) .Repeat.Never(); DownHierarchyQuestCommand command = new DownHierarchyQuestCommand(quest, beforeQuestCommanduestCommand, afterQuestCommand); //Act bool result = command.Execute(); //Assert Assert.IsTrue(result); beforeQuestCommanduestCommand.VerifyAllExpectations(); afterQuestCommand.VerifyAllExpectations(); }