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>()); }
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); }