Exemplo n.º 1
0
        public void ShouldRaiseWarningOnUnexpectedKindInReferenceInEvent()
        {
            var ev      = MockRepository.GenerateMock <WarningEvent>();
            var model   = new DocumentModel(RealParser, StubEventAggregator);
            var members = new IDocumentationMember[] { Event <Second>(@"<member name=""E:Example.Second.AnEvent""><summary><see cref=""G:Whats-a-g"" /></summary></member>", "AnEvent") };

            StubEventAggregator.Stub(x => x.GetEvent <WarningEvent>())
            .Return(ev);

            model.Create(members);

            ev.AssertWasCalled(x => x.Publish("Unsupported documentation member found: 'G:Whats-a-g'"));
        }
Exemplo n.º 2
0
        public void set_assemblies_should_publish_event_if_bad_file_found()
        {
            var ev     = MockRepository.GenerateMock <BadFileEvent>();
            var parser = MockRepository.GenerateMock <IAssemblyXmlParser>();

            StubEventAggregator.Stub(x => x.GetEvent <BadFileEvent>())
            .Return(ev);

            var generator = new DocumentationGenerator(new AssemblyLoader(), StubXmlLoader, parser, StubWriter, StubResourceManager, StubEventAggregator);

            generator.SetAssemblies(new[] { "docu.pdb" });

            ev.AssertWasCalled(x => x.Publish("docu.pdb"));
        }