public Task ReceiveAsync(MouseInput input)
        {
            var sb = new StringBuilder();

            sb.AppendLine("TestMouseReceiver");
            sb.AppendLine(input.CreateOverview());

            FileWriter.Write(sb.ToString());

            return(Task.CompletedTask);
        }
        public void CreatingOverview_CreatedOverview()
        {
            // Arrange
            const MouseInputKey       InputKey       = MouseInputKey.Left;
            const MouseInputDirection InputDirection = MouseInputDirection.MouseUp;

            var sut = new MouseInput(InputKey, InputDirection);

            // Act
            var actualOverview = sut.CreateOverview();

            // Assert
            var actualOverviewLines = actualOverview.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);

            Assert.AreEqual(2, actualOverviewLines.Length);
            Assert.AreEqual($"Key: {InputKey}", actualOverviewLines[0]);
            Assert.AreEqual($"Direction: {InputDirection}", actualOverviewLines[1]);
        }
示例#3
0
 public Task ReceiveAsync(MouseInput input)
 {
     Console.WriteLine(input.CreateOverview());
     return(Task.CompletedTask);
 }