public MaintenanceServiceTests()
 {
     MessageList            = MessageListStub.Get();
     _messageRepositoryMock = Substitute.For <IMessageRepository>();
     _messageRepositoryMock.AddMessage(Arg.Any <IRceMessage>())
     .Returns(Task.CompletedTask)
     .AndDoes(e => MessageList.AddRange(e.Args().Cast <IRceMessage>()));
     _messageRepositoryMock.RemoveMessages(Arg.Any <IEnumerable <Guid> >())
     .Returns(Task.CompletedTask)
     .AndDoes(e => MessageList.RemoveAll(f => ((IEnumerable <Guid>)e.Args().First()).Contains(f.MessageId)));
     _maintenanceService = new MaintenanceService(_messageRepositoryMock);
 }
예제 #2
0
 public MinimizationTests()
 {
     MessageList = MessageListStub.Get();
 }