public void ShouldConvertToCreateMessageCorrectly() { var bugDto = new BugDTO {Name = "Name"}; ObjectFactory.GetInstance<ITpBus>().Send(new CreateBugCommand(bugDto)); ObjectFactory.GetInstance<IBus>().AssertWasCalled( x => x.Send(Arg<CreateCommand[]>.Matches(y => y.Length == 1 && (((BugDTO)y[0].Dto).Name).Equals(bugDto.Name)))); }
public void ShouldConvertToUpdateMessageCorrectly() { var bugDto = new BugDTO {Name = "Name"}; ObjectFactory.GetInstance<ITpBus>().Send(new UpdateBugCommand(bugDto, new Enum[] {BugField.Name})); ObjectFactory.GetInstance<IBus>().AssertWasCalled( x => x.Send( Arg<UpdateCommand[]>.Matches( y => y.Length == 1 && ((BugDTO)y[0].Dto).Name.Equals(bugDto.Name) && y[0].ChangedFields.ToArray().Contains(BugField.Name.ToString())))); }
public IBugzillaQuery GetChangeStatusAction(BugDTO tpBug, string bugzillaBugId, string status) { return new BugzillaChangeStatusAction(bugzillaBugId, status, tpBug.CommentOnChangingState); }
public ConvertedBug() { BugDto = new BugDTO(); ChangedFields = new List<Enum>(); }