// The constructor creates a Connection from the source to the destination public Connection(IConnectable source, string sourceOutput, IConnectable destination, string destinationInput, Color typeColor) { Source = source; SourceOutput = sourceOutput; Destination = destination; DestinationInput = destinationInput; ConnectionType = ConnectionTypeFactory.GetType(typeColor); }
public void ConnectionTypeTestConstructorComplex() { var newConnectionType = new ConnectionType("DriveCommand", "DriveCommand", "new DriveCommand()", "new DriveCommand()"); ConnectionTypeFactory.RegisterType(Color.Cyan, newConnectionType); var connectionType = ConnectionTypeFactory.GetType(Color.Cyan); Assert.AreEqual(newConnectionType, connectionType); }
private static IConnectionType Boolean() => ConnectionTypeFactory.GetType(Green);
private static IConnectionType Double() => ConnectionTypeFactory.GetType(Blue);
private static IConnectionType Integer() => ConnectionTypeFactory.GetType(Red);