@Test public void testOKConnection() { ConnectorBroker cb = new ConnectorBroker(); ConnectorType testConnType = new ConnectorType(); testConnType.setQualifiedName("Test.ConnectorType"); testConnType.setDisplayName("TestCT"); testConnType.setConnectorProviderClassName(MockConnectorProvider.class.getName()); Connection testConnection = new Connection(); testConnection.setQualifiedName("Test.Connection"); testConnection.setDisplayName("Test"); testConnection.setConnectorType(testConnType); try { Connector newConnector = cb.getConnector(testConnection); MockConnector mockConnector = (MockConnector)newConnector; assertTrue(mockConnector.getMockConnectorData().contains("This is from the mock connector")); assertTrue(mockConnector.getConnectedAssetProperties("TestUserId") == null); } catch (Throwable error) { assertTrue(false); } }
public Connector getConnector(Connection connection) throws ConnectionCheckedException, ConnectorCheckedException { if (connection == null) { return this.getConnector((ConnectionProperties)null); } else if (connection instanceof VirtualConnection) { return this.getConnector(new VirtualConnectionProperties((VirtualConnection)connection)); } else { return this.getConnector(new ConnectionProperties(connection)); } }
ConnectorBroker { public Connector getConnector(Connection connection) throws ConnectionCheckedException, ConnectorCheckedException { if (connection == null) { return this.getConnector((ConnectionProperties)null); } else if (connection instanceof VirtualConnection) { return this.getConnector(new VirtualConnectionProperties((VirtualConnection)connection)); } else { return this.getConnector(new ConnectionProperties(connection)); } } }
ConnectorBroker { public Connector getConnector(Connection connection) throws ConnectionCheckedException, ConnectorCheckedException { if (connection == null) { return this.getConnector((ConnectionProperties)null); } else if (connection instanceof VirtualConnection) { return this.getConnector(new VirtualConnectionProperties((VirtualConnection)connection)); } else { return this.getConnector(new ConnectionProperties(connection)); } } ConnectorBroker();  ConnectorBroker(AuditLog   auditLog); }
ConnectorBroker { public Connector getConnector(Connection connection) throws ConnectionCheckedException, ConnectorCheckedException { if (connection == null) { return this.getConnector((ConnectionProperties)null); } else if (connection instanceof VirtualConnection) { return this.getConnector(new VirtualConnectionProperties((VirtualConnection)connection)); } else { return this.getConnector(new ConnectionProperties(connection)); } } ConnectorBroker();  ConnectorBroker(AuditLog   auditLog); void validateConnection(Connection    connection); void validateConnection(ConnectionProperties    connection); Connector getConnector(Connection connection); Connector getConnector(ConnectionProperties connection); int hashCode(); @Override boolean equals(Object object); @Override String toString(); }
ConnectorBroker { public Connector getConnector(Connection connection) throws ConnectionCheckedException, ConnectorCheckedException { if (connection == null) { return this.getConnector((ConnectionProperties)null); } else if (connection instanceof VirtualConnection) { return this.getConnector(new VirtualConnectionProperties((VirtualConnection)connection)); } else { return this.getConnector(new ConnectionProperties(connection)); } } ConnectorBroker();  ConnectorBroker(AuditLog   auditLog); void validateConnection(Connection    connection); void validateConnection(ConnectionProperties    connection); Connector getConnector(Connection connection); Connector getConnector(ConnectionProperties connection); int hashCode(); @Override boolean equals(Object object); @Override String toString();  }