public void Constructor_AllParametersAreSet_ObjectIsInstantiated() { // Arrange var systemInformationSender = new Mock <ISystemInformationSender>(); var messageQueueProvider = new Mock <IMessageQueueProvider <SystemInformation> >(); // Act var systemInformationMessageQueueFeederFactory = new SystemInformationMessageQueueWorkerFactory( systemInformationSender.Object, messageQueueProvider.Object); // Assert Assert.IsNotNull(systemInformationMessageQueueFeederFactory); }
public void GetMessageQueueWorker_WorkQueueIsNotNull_ErrorQueueIsNotNull_ResultIsNotNull() { // Arrange var systemInformationSender = new Mock <ISystemInformationSender>(); var workQueue = new Mock <IMessageQueue <SystemInformation> >(); var errorQueue = new Mock <IMessageQueue <SystemInformation> >(); var messageQueueProvider = new Mock <IMessageQueueProvider <SystemInformation> >(); messageQueueProvider.Setup(m => m.WorkQueue).Returns(workQueue.Object); messageQueueProvider.Setup(m => m.ErrorQueue).Returns(errorQueue.Object); var systemInformationMessageQueueFeederFactory = new SystemInformationMessageQueueWorkerFactory(systemInformationSender.Object, messageQueueProvider.Object); // Act var result = systemInformationMessageQueueFeederFactory.GetMessageQueueWorker(); // Assert Assert.IsNotNull(result); }