Exemple #1
0
        public ConnectionsApiTests(ITestOutputHelper output)
        {
            lsTelematicsConnetions = new List <Connection>();

            var route4Me = new Route4MeManagerV5(c_ApiKey);

            var connectionParams = new ConnectionParameters()
            {
                Vendor    = TelematicsVendorType.Tomtom.Description(),
                VendorId  = 154,
                Name      = "Connection to GeoTab",
                Host      = "telematics.tomtom.com/en_au/webfleet/",
                ApiKey    = "11111111111111111111111111111111",
                AccountId = "SDS545454SASWEWA21DFFD54FGPPP456",
                UserName  = "******",
                Password  = "******",
                VehiclePositionRefreshRate = 30,
                ValidateRemoteCredentials  = false,
                IsEnabled = true,
                Metadata  = "string"
            };

            var telematicsConnetion = route4Me.RegisterTelematicsConnection(
                connectionParams,
                out ResultResponse resultResponse);

            Assert.NotNull(telematicsConnetion);
            Assert.IsType <Connection>(telematicsConnetion);

            lsTelematicsConnetions.Add(telematicsConnetion);
        }
Exemple #2
0
        public void UpdateTelematicsConnectionTest()
        {
            var route4Me = new Route4MeManagerV5(c_ApiKey);

            var connectionParams = new ConnectionParameters()
            {
                ConnectionToken            = lsTelematicsConnetions[lsTelematicsConnetions.Count - 1].ConnectionToken,
                Vendor                     = TelematicsVendorType.Geotab.Description(),
                VendorId                   = 154,
                Name                       = "Connection to GeoTab",
                ApiKey                     = "11111111111111111111111111111111",
                AccountId                  = "SDS545454SASWEWA21DFFD54FGPPP456",
                UserName                   = "******",
                Password                   = "******",
                VehiclePositionRefreshRate = 60,
                ValidateRemoteCredentials  = false,
                IsEnabled                  = true,
                Metadata                   = "string"
            };

            var result = route4Me.RegisterTelematicsConnection(
                connectionParams,
                out ResultResponse resultResponse);

            Assert.NotNull(result);
            Assert.IsType <Connection>(result);
        }