Exemplo n.º 1
0
        public void InitTest()
        {
            var mockConfig = GetMockConfiguration();
            var mockApplication = GetMockApplication();

            var target = new AntiScrapeModule(mockConfig.Object, obj => mockApplication.Object);

            target.Init(mockApplication.Object);
        }
Exemplo n.º 2
0
        public void PipelineEventsTest()
        {
            var mockConfig = GetMockConfiguration();
            var mockApplication = GetMockApplication();

            var target = new AntiScrapeModule(mockConfig.Object, obj => mockApplication.Object);

            target.Init(mockApplication.Object);

            mockApplication.Raise(x => x.BeginRequest += null, EventArgs.Empty);
            mockApplication.Raise(x => x.PostMapRequestHandler += null, EventArgs.Empty);
        }