IsInState() public méthode

public IsInState ( State state ) : bool
state State
Résultat bool
Exemple #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));
        }
Exemple #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));
        }