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)))); }
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"))); }