public void TestWorkStationClassIsComplete() { FAMIX.Class value = (FAMIX.Class)importer.Types.Named("VBLanLibrary.WorkStation"); Assert.AreEqual(value.SuperInheritances.Count, 1); Assert.AreEqual(value.SuperInheritances.First <FAMIX.Inheritance>().superclass.name, "Node"); Assert.AreEqual(value.Methods.Count, 7); Assert.AreEqual(value.Attributes.Count, 5); }
public void AddAllAttributesInto(FAMIX.Class FamixClass) { foreach (var entity in group) { FamixClass.AddAttribute((Attribute)entity); ((Attribute)entity).parentType = FamixClass; } }
public void TestPacketClassIsComplete() { FAMIX.Class value = (FAMIX.Class)importer.Types.Named("VBLanLibrary.Packet"); Assert.AreEqual(value.SuperInheritances.Count, 1); Assert.AreEqual(value.SuperInheritances.First <FAMIX.Inheritance>().superclass.name, "Object"); Assert.AreEqual(value.Attributes.Count, 3); Assert.AreEqual(value.Methods.Count, 1 + 6); }
public void TestFileServerClassIsComplete() { FAMIX.Class value = (FAMIX.Class)importer.Types.Named("VBLanLibrary.FileServer"); Assert.AreEqual(value.SuperInheritances.Count, 1); Assert.AreEqual(value.SuperInheritances.First <FAMIX.Inheritance>().superclass.name, "OutputServer"); Assert.AreEqual(value.Attributes.Count, 1); Assert.AreEqual(value.Methods.Count, 2 + 2); }
public void TestSingleDestinationAddressClassIsComplete() { FAMIX.Class value = (FAMIX.Class)importer.Types.Named("VBLanLibrary.SingleDestinationAddress"); Assert.AreEqual(value.SuperInheritances.Count, 1); Assert.AreEqual(value.SuperInheritances.First <FAMIX.Inheritance>().superclass.name, "AbstractDestinationAddress"); Assert.AreEqual(value.Attributes.Count, 1); Assert.AreEqual(value.Methods.Count, 2 + 3); }
private FAMIX.Class CreateNewInterface(INamedTypeSymbol node) { FAMIX.Class entity = this.CreateNewEntity <FAMIX.Class>(typeof(FAMIX.Class).FullName); entity.isInterface = true; entity.isAbstract = true; entity.name = helper.FullTypeName(node); entity.isFinal = node.IsSealed; entity.accessibility = helper.AccessibilityName(node.DeclaredAccessibility); return(entity); }
public void TestOutputServerClassIsComplete() { FAMIX.Class value = (FAMIX.Class)importer.Types.Named("VBLanLibrary.OutputServer"); Assert.AreEqual(value.SuperInheritances.Count, 1); Assert.AreEqual(value.SuperInheritances.First <FAMIX.Inheritance>().superclass.name, "Node"); // There is one Property defined. It should be detected regardless the abstract nature of the class Assert.AreEqual(value.Attributes.Count, 1); // There is one abstract Method defined. It should be detected regardless the abstract nature of the class and method. Plus the setters/ Assert.AreEqual(value.Methods.Count, 2 + 3); }
public void AssertClassAggregationIsConsistent(string name) { FAMIX.Class value = (FAMIX.Class)importer.Types.Named(name); int constructors = (from m in value.Methods where m.isConstructor select m).ToList().Count(); Assert.AreEqual(value.numberOfConstructorMethods, constructors); Assert.AreEqual(value.Methods.Count, value.numberOfMethods); Assert.AreEqual(value.Attributes.Count, value.numberOfAttributes); }
public override void VisitInterfaceDeclaration(InterfaceDeclarationSyntax node) { var typeSymbol = importer.model.GetDeclaredSymbol(node); FAMIX.Class type = (FAMIX.Class)importer.EnsureType(typeSymbol); type.isInterface = true; //type.name = node.Identifier.ToString(); AddSuperInterfaces(typeSymbol, type); currentTypeStack.Push(type); importer.CreateSourceAnchor(type, node); type.isStub = false; base.VisitInterfaceDeclaration(node); currentTypeStack.Pop(); }
public void AssertClassIsAccessibleByNameAndNamed(string fullName, string name) { FAMIX.Class value = (FAMIX.Class)importer.Types.Named(fullName); Assert.IsNotNull(value); Assert.AreEqual(value.name, name); }