public StubClassDiagramVisitorContext(ClassDiagramScanModes scanMode)
 {
     this.TypeMetaModelSet        = new TypeMetaModelSet();
     this.ScanMode                = scanMode;
     this.ShowMembers             = true;
     this.ShowMembersBindingFlags = ClassDiagramOptions.ShowMembersBindingFlagsDefault;
     this.ShowMethods             = false;
     this.ShowMethodsBindingFlags = ClassDiagramOptions.ShowMethodsBindingFlagsDefault;
 }
 public StubClassDiagramVisitorContext(ClassDiagramScanModes scanMode)
 {
     this.TypeMetaModelSet = new TypeMetaModelSet();
     this.ScanMode = scanMode;
     this.ShowMembers = true;
     this.ShowMembersBindingFlags = ClassDiagramOptions.ShowMembersBindingFlagsDefault;
     this.ShowMethods = false;
     this.ShowMethodsBindingFlags = ClassDiagramOptions.ShowMethodsBindingFlagsDefault;
 }
        public void Scan_Suite(Type subjectType, ClassDiagramScanModes scanMode, string[] expectations)
        {
            using (new ClassDiagramGeneration(new StubClassDiagramVisitorContext(scanMode)))
            {
                ClassDescriptor descriptor = new ReflectedClassDescriptor(subjectType);
                descriptor.Visit();
                Assert.That(descriptor.Members.Count, Is.EqualTo(expectations.Length));

                for (int index = 0; index < expectations.Length; index++)
                {
                    Assert.That(descriptor.Members[index].Name, Is.EqualTo(expectations[index]));
                }
            }
        }
Beispiel #4
0
        public void Scan_Suite(Type subjectType, ClassDiagramScanModes scanMode, string[] expectations)
        {
            using (new ClassDiagramGeneration(new StubClassDiagramVisitorContext(scanMode)))
            {
                ClassDescriptor descriptor = new ReflectedClassDescriptor(subjectType);
                descriptor.Visit();
                Assert.That(descriptor.Members.Count, Is.EqualTo(expectations.Length));

                for (int index = 0; index < expectations.Length; index++)
                {
                    Assert.That(descriptor.Members[index].Name, Is.EqualTo(expectations[index]));
                }
            }
        }
Beispiel #5
0
        public ClassDiagramOptions ScanModeOf(ClassDiagramScanModes scanMode)
        {
            _diagram.ScanMode = scanMode;

            return(this);
        }