Example #1
0
        public void should_load_xml_files_if_names_used()
        {
            var xmlLoader = MockRepository.GenerateMock<IXmlLoader>();
            var generator = new DocumentationGenerator(StubAssemblyLoader, xmlLoader, StubParser, StubWriter, StubResourceManager, StubEventAggregator);

            generator.SetXmlFiles(new[] { "assembly.xml", "assembly2.xml" });

            xmlLoader.AssertWasCalled(x => x.LoadFrom("assembly.xml"));
            xmlLoader.AssertWasCalled(x => x.LoadFrom("assembly2.xml"));
        }
Example #2
0
File: SetXml.cs Project: wsky/docu
        public void should_load_xml_files_if_names_used()
        {
            var xmlLoader = MockRepository.GenerateMock <IXmlLoader>();
            var generator = new DocumentationGenerator(StubAssemblyLoader, xmlLoader, StubParser, StubWriter, StubResourceManager, StubEventAggregator);

            generator.SetXmlFiles(new[] { "assembly.xml", "assembly2.xml" });

            xmlLoader.AssertWasCalled(x => x.LoadFrom("assembly.xml"));
            xmlLoader.AssertWasCalled(x => x.LoadFrom("assembly2.xml"));
        }
Example #3
0
        public void generate_should_pass_xmls_to_parser_when_set_by_name()
        {
            var parser = MockRepository.GenerateMock<IAssemblyXmlParser>();
            var generator = new DocumentationGenerator(StubAssemblyLoader, StubXmlLoader, parser, StubWriter, StubResourceManager, StubEventAggregator);

            StubXmlLoader.Stub(x => x.LoadFrom(null))
                .IgnoreArguments()
                .Return("content");

            generator.SetXmlFiles(new[] { "assembly.xml" });
            generator.Generate();

            parser.AssertWasCalled(x => x.CreateDocumentModel(null, null),
                x => x.Constraints(Is.Anything(), List.ContainsAll(new[] { "content" })));
        }
Example #4
0
File: SetXml.cs Project: wsky/docu
        public void generate_should_pass_xmls_to_parser_when_set_by_name()
        {
            var parser    = MockRepository.GenerateMock <IAssemblyXmlParser>();
            var generator = new DocumentationGenerator(StubAssemblyLoader, StubXmlLoader, parser, StubWriter, StubResourceManager, StubEventAggregator);

            StubXmlLoader.Stub(x => x.LoadFrom(null))
            .IgnoreArguments()
            .Return("content");

            generator.SetXmlFiles(new[] { "assembly.xml" });
            generator.Generate();

            parser.AssertWasCalled(x => x.CreateDocumentModel(null, null),
                                   x => x.Constraints(Is.Anything(), List.ContainsAll(new[] { "content" })));
        }