public static void PhoneIdStandard(string[] args) { CheckArgument.ArrayLengthIs(args, 1, "args"); string phoneNumber = args[0]; PhoneIdService service = new PhoneIdService(GetConfiguration()); PhoneIdStandardResponse response = service.StandardLookup(phoneNumber); }
public void TestPhoneIdStandardWrapsParserErrors() { string message = "My exception message"; IPhoneIdResponseParser parser = new FakeResponseParser() { ExpectedException = new Exception(message), }; PhoneIdService service = this.CreateService(null, parser); Assert.Throws <ResponseParseException>(delegate { service.StandardLookup("15555555555"); }); }
public static void MapRegistrationLocation(string[] args) { CheckArgument.ArrayLengthIs(args, 1, "args"); string phoneNumber = args[0]; PhoneIdService service = new PhoneIdService(GetConfiguration()); PhoneIdStandardResponse response = service.StandardLookup(phoneNumber); string url = string.Format( "http://maps.google.com/maps?q={0},{1}", response.Location.Coordinates.Latitude, response.Location.Coordinates.Longitude); Process.Start(url); }