Esempio n. 1
0
 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);
 }
Esempio n. 2
0
            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());
            }
Esempio n. 3
0
 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 }
     };
 }
Esempio n. 4
0
 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();
 }