Watch() public method

Initiates the instance monitoring
public Watch ( ) : void
return void
Example #1
0
        public async Task TestMissingEndpoints()
        {
            var instance = new ManagedInstance
            {
                ApiKey = "unittest"
            };

            instance.Watch();

            await Task.Delay(TimeSpan.FromSeconds(3));


            Assert.IsTrue(instance.IsInState(ManagedInstance.State.Disconnected));
        }
Example #2
0
        public async Task TestMissingApiKey()
        {
            var instance = new ManagedInstance
            {
                PossibleEndpoints = GetDefaultRestEndpointCollection()
            };

            instance.Watch();

            await Task.Delay(TimeSpan.FromSeconds(3));

            Assert.IsTrue(instance.IsInState(ManagedInstance.State.Disconnected));
        }