Пример #1
0
        public void WhenHttpContextIsAvailableGetAssemblyFromApplicationInstanceAssembly()
        {
            var fakeHttpContext  = FakeHttpContext.For(new FakeHttpApplication());
            var assemblyResolver = new WebAssemblyResolver(fakeHttpContext, null);

            var resolvedAssembly            = assemblyResolver.GetApplicationAssembly();
            var fakeHttpApplicationAssembly = fakeHttpContext.ApplicationInstance.GetType().Assembly;

            Assert.That(resolvedAssembly, Is.EqualTo(fakeHttpApplicationAssembly));
        }
Пример #2
0
 public void SetUp()
 {
     _raygunMessageBuilder       = new RaygunMessageBuilder(() => FakeHttpContext.For(new FakeHttpApplication()));
     _fakeUserCustomDataBuilder  = new FakeUserCustomDataBuilder();
     _fakeRaygunClient           = new FakeRaygunClient();
     _currentThreadTaskScheduler = new CurrentThreadTaskScheduler();
     _appender = new TestRaygunAppender(_fakeUserCustomDataBuilder,
                                        _raygunMessageBuilder,
                                        RaygunClientFactoryMethod.From(apiKey => _fakeRaygunClient),
                                        new TypeActivator(l => { }),
                                        _currentThreadTaskScheduler);
 }