예제 #1
0
파일: Events.cs 프로젝트: ChrisMissal/docu
        public void ShouldForceTypeIfOnlyEventDefined()
        {
            var model = new DocumentModel(StubParser, StubEventAggregator);
            var members = new[] { Event<Second>(@"<member name=""E:Example.Second.AnEvent"" />", "AnEvent") };
            var namespaces = model.Create(members);

            namespaces[0].Name.ShouldEqual("Example");
            namespaces[0].Types.ShouldContain(x => x.IsIdentifiedBy(Identifier.FromType(typeof(Second))));
        }
예제 #2
0
파일: Namespaces.cs 프로젝트: jujis008/docu
        public void ShouldBuildNamespaces()
        {
            var model = new DocumentModel(StubParser, StubEventAggregator);
            var members = new[]
            {
                Type<First>(@"<member name=""T:Example.First"" />"),  
                Type<DeepFirst>(@"<member name=""T:Example.Deep.DeepFirst"" />"),
            };
            var namespaces = model.Create(members);

            namespaces.ShouldContain(x => x.IsIdentifiedBy(Identifier.FromNamespace("Example")));
            namespaces.ShouldContain(x => x.IsIdentifiedBy(Identifier.FromNamespace("Example.Deep")));
        }