public void Setup() { _timerFake = new TimerFake(); _timerFactoryFake = new TimerFactoryFake(_timerFake); _loggerFake = new LoggerFake(); _context = new OwinContextFake(); _nextFake = new OwinMiddlewareFake(); _loggingMiddleware = new LoggingMiddleware(_nextFake, _loggerFake, _timerFactoryFake); }
public void StartMatrixWalk_ValidParams_ShouldPrintCorrect() { int cellSize = 6; string expectedText = " 1 28 29 31 35 36 27 2 24 30 32 34 26 25 3 23 22 33 13 15 17 4 19 21 12 14 16 18 5 20 11 10 9 8 7 6"; var loggerMock = new LoggerFake(); Matrix.StartMatrixWalk(cellSize, loggerMock); Assert.AreEqual(expectedText, loggerMock.Text.ToString()); }
public void Initialize() { ArticleService = new ArticleServiceFake(); FieldService = new FieldServiceFake(); ProductService = new ProductServiceFake(); Logger = new LoggerFake(); TransactionFactory = () => new TransactionFake(); Action = new ActionBaseFake(ArticleService, FieldService, ProductService, TransactionFactory); Context = new ActionContext { ContentItemIds = new[] { ContentItemId } }; }
public void Initialize() { ArticleService = new ArticleServiceFake(); NotificationService = new QPNotificationServiceFake(); FieldService = new FieldServiceFake(); FreezeService = new FreezeServiceFake(); ValidationService = new ValidationServiceFake(); ProductService = new ProductServiceFake { Content = new Content() { ContentId = ContentId } }; Transaction = null; Logger = new LoggerFake(); Context = new ActionContext(); InitializeAction(); }