Beispiel #1
0
        public async Task keyprovider_detects_windows_key_presses()
        {
            // arrange
            var player   = KeyStreams.WinkeyE();
            var provider = new KeyProvider(player, passwordModeService, desktopLockEventService, settingsProvider);

            // act
            var processedKeys = await provider.GetKeyStream().ToList();

            // assert
            Assert.Equal(new[] { "Win", "e" }, processedKeys.Single().Input);
        }
Beispiel #2
0
        public void keyprovider_detects_windows_key_presses()
        {
            // arrange
            var player   = KeyStreams.WinkeyE();
            var provider = new KeyProvider(player, passwordModeService, desktopLockEventService);

            // act
            var processedKeys = ToEnumerable(provider, player);

            // assert
            Assert.Equal(new[] { "Win", "e" }, processedKeys.Single().Input);
        }
Beispiel #3
0
        public void keyprovider_detects_windows_key_presses()
        {
            // arrange
            var player   = KeyStreams.WinkeyE();
            var provider = new KeyProvider(player, passwordModeService);

            // act
            var processedKeys = ToEnumerable(provider, player);

            // assert
            //TODO I think for this case we need to use the TestScheduler.. Someone that knows Rx can fix this test :)
            //Assert.Equal(new[] { "Win", "E" }, processedKeys.Single().Input);
        }