Watch() 공개 메소드

Initiates the instance monitoring
public Watch ( ) : void
리턴 void
예제 #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));
        }
예제 #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));
        }