Esempio n. 1
0
        public async Task ChangeSessionTest()
        {
            //Get current session information
            var sessionInformation = await client.SessionGetAsync();

            //Save old speed limit up
            var oldSpeedLimit        = sessionInformation.SpeedLimitUp;
            var oldSppedLimitEnabled = sessionInformation.SpeedLimitUpEnabled;

            //Set new speed limit
            sessionInformation.SpeedLimitUp        = 200;
            sessionInformation.SpeedLimitUpEnabled = true;

            //Set new session settings
            client.SessionSetAsync(sessionInformation);

            //Get new session information
            var newSessionInformation = await client.SessionGetAsync();

            //Check new speed limit
            Assert.AreEqual(200, newSessionInformation.SpeedLimitUp);

            //Restore speed limit
            newSessionInformation.SpeedLimitUp        = oldSpeedLimit;
            newSessionInformation.SpeedLimitUpEnabled = oldSppedLimitEnabled;

            //Set new session settinhs
            client.SessionSetAsync(newSessionInformation);
        }
Esempio n. 2
0
 /// <summary>
 /// Set session settings
 /// </summary>
 /// <returns></returns>
 public async Task <bool> Set(SessionSettings request) => await _client.SessionSetAsync(request);