예제 #1
0
        public void Execute_OutcomeIsNotID_DoNotRegisterOutcome(string outcome, [Frozen] ITrackerService trackerService, [Greedy] RegisterOutcome registerOutcome)
        {
            //Arrange
            registerOutcome.Outcome = outcome;

            //Act
            registerOutcome.Execute(ID.Null, null);

            //Assert
            trackerService.DidNotReceive().TrackOutcome(Arg.Any <ID>());
        }
예제 #2
0
        public void Execute_OutcomeID_RegisterOutcome(Db db, ID outcomeId, [Frozen] ITrackerService trackerService, [Greedy] RegisterOutcome registerOutcome)
        {
            //Arrange
            db.Add(new DbItem("WrongOutcome", outcomeId, Constants.OutcomeTemplateId));
            registerOutcome.Outcome = outcomeId.ToString();

            //Act
            registerOutcome.Execute(ID.Null, null);

            //Assert
            trackerService.Received().TrackOutcome(outcomeId);
        }