public void NotEmptyClassContainsInnerClass() { this.ParseClassWithEmptyClassInside(); FAMIX.Class element = this.GetElement <FAMIX.Class>(1); FAMIX.Class inner = this.GetElement <FAMIX.Class>(2); Assert.AreEqual(element.Types[0], inner); }
public void InnerClassOfNotEmptyClassIsContainedInExampleClass() { this.ParseClassWithEmptyClassInside(); FAMIX.Class example = this.GetElement <FAMIX.Class>(1); FAMIX.Class inner = this.GetElement <FAMIX.Class>(2); Assert.AreEqual(inner.container, example); }
private Boolean SubClassDirectlyOrNotFromObject(FAMIX.Class instance) { if (instance.isInterface || instance.isStub) { return(true); } if (instance.SuperInheritances.Count == 0) { return(instance.name.Equals("Object")); } return(this.SubClassDirectlyOrNotFromObject((FAMIX.Class)instance.SuperInheritances.First().superclass)); }
public void VBLanInterfacesHaveImplementors() { List <FAMIX.Class> classes = ( from famixClass in importer.AllElementsOfType <FAMIX.Class>().ToList() where famixClass.container != null && famixClass.container.name.Equals("VBLanLibrary") && famixClass.isInterface select famixClass).ToList(); FAMIX.Class Interface = classes.First(); Assert.AreEqual(Interface.SubInheritances.Count, 1); Assert.AreEqual(Interface.SubInheritances.First().subclass.name, "XPrinter"); }
public void ParseStudyCase() { this.Import(@" Class Example Public AStringValue As string Private ReadOnly AnIntValue As integer Protected ADateValue As Date Property AnEmptySetGetProperty As String Public Property AnNonEmptySetGetProperty As String Get Return AStringValue End Get Set(value As String) AStringValue = value End Set End Property End Class "); ClassElement = this.GetElement <FAMIX.Class>(1); }
public void EmptyShadowsClassIsEmpty() { this.ParseEmptyShadowsClass(); FAMIX.Class element = this.GetElement <FAMIX.Class>(1); Assert.IsTrue(element.Types.Count == 0); }
public void NotEmptyClassIsNamedExample() { this.ParseClassWithEmptyClassInside(); FAMIX.Class element = this.GetElement <FAMIX.Class>(1); Assert.AreEqual(element.name, "Example"); }
public void InnerClassOfNotEmptyClassIsNamedInner() { this.ParseClassWithEmptyClassInside(); FAMIX.Class element = this.GetElement <FAMIX.Class>(2); Assert.AreEqual(element.name, "Example.Inner"); }
public void EmptyNotInheritableClassIsEmpty() { this.ParseEmptyNonInheritableClass(); FAMIX.Class element = this.GetElement <FAMIX.Class>(1); Assert.IsTrue(element.Types.Count == 0); }
public void EmptyClassIsNotShadowing() { this.ParseEmptyClass(); FAMIX.Class element = this.GetElement <FAMIX.Class>(1); Assert.IsFalse(element.isShadow); }
public void EmptyClassIsNotFinal() { this.ParseEmptyClass(); FAMIX.Class element = this.GetElement <FAMIX.Class>(1); Assert.IsFalse(element.isFinal); }
public void EmptyClassIsNotAbstract() { this.ParseEmptyClass(); FAMIX.Class element = this.GetElement <FAMIX.Class>(1); Assert.IsFalse(element.isAbstract); }
public void EmptyMustInheritClassIsAbstract() { this.ParseEmptyMustInheritClass(); FAMIX.Class element = this.GetElement <FAMIX.Class>(1); Assert.IsTrue(element.isAbstract); }
public void EmptyMustInheritClassIsNamedExample() { this.ParseEmptyMustInheritClass(); FAMIX.Class element = this.GetElement <FAMIX.Class>(1); Assert.AreEqual(element.name, "Example"); }
public void EmptyNotInheritableIsFinal() { this.ParseEmptyNonInheritableClass(); FAMIX.Class element = this.GetElement <FAMIX.Class>(1); Assert.IsTrue(element.isFinal); }
public void NotEmptyClassIsNotEmpty() { this.ParseClassWithEmptyClassInside(); FAMIX.Class element = this.GetElement <FAMIX.Class>(1); Assert.AreEqual(element.Types.Count, 1); }
public void EmptyShadowsClassIsShadowing() { this.ParseEmptyShadowsClass(); FAMIX.Class element = this.GetElement <FAMIX.Class>(1); Assert.IsTrue(element.isShadow); }