public void TestInstanceConnectorExecute() { var component = new AirportInfoComponent(); var channelName = component.Channels.First().Name; var results = component.Execute(channelName, "JFK", "LAX", "ORD"); Assert.IsInstanceOf <List <object> >(results); }
public void TestGenericExecuteHelper() { // Arrange const string iata = "LAX"; // Act var airportInfo = AirportInfoComponent.Execute <AirportInfo>(iata); var state = airportInfo.State; // Assert Assert.AreEqual("California", state); }
public void TestStaticHelper() { // Arrange const string iata = "JFK"; // Act var info = AirportInfoComponent.Execute(iata); // Assert Assert.NotNull(info); Assert.IsInstanceOf(typeof(string), info); }
private static void Main(string[] args) { // receive raw airport data var info = AirportInfoComponent.Execute("JFK"); // {"delay":"true","IATA":"JFK"... // directly map results to your classes var delay = AirportInfoComponent.Execute <AirportInfo>("JFK").Delay; // true // string components together var sequence = PipeConnector.CreateSequence <AirportInfoComponent, UnaryAbbreviationExtenderComponent>(); var example = sequence.Execute("JFK"); // example = {"delay":"true","internationalAirTransportAssociation":"John Fitzgerald Kennedy... var username = "******"; var password = "******"; var sessionId = GeoNamesPostalCodesComponent.Login(username, password); var result = (string)GeoNamesPostalCodesComponent.PostalCode(username, sessionId, "8001"); var geo = result.ToInstance <GeoInfo>(); }