public static CreateKVRequest <RingbaUOW> ToKVRequest(this RingbaUOW ringbaUOW) { return(new CreateKVRequest <RingbaUOW> { ExpireInSeconds = ringbaUOW.MaxAgeInSeconds, Item = ringbaUOW, Key = ringbaUOW.UOWId }); }
public async Task ShouldCallProcessMessageWithMessageBody() { //Arrange var service = SetupService(); var ringbaUow = new RingbaUOW(); //Act await service.ProcessMessageAsync(new MessageWrapper <RingbaUOW> { Body = ringbaUow }, new ConcurrentBag <UpdateBatchRequest>(), new ConcurrentBag <string>()); //Assert Assert.Equal(1, _processService.ReceivedCalls().Count(c => c.GetMethodInfo().Name == "ProccessMessageAsync")); Assert.Same(ringbaUow, _processService.ReceivedCalls().Single(c => c.GetMethodInfo().Name == "ProccessMessageAsync") .GetArguments()[0] as RingbaUOW); }