Hello GitHub
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using Etw.Managed;
|
||||
using Calculator.UIAutomationLibrary.Components;
|
||||
using WEX.TestExecution;
|
||||
|
||||
namespace Calculator.UIAutomationLibrary.Tests
|
||||
{
|
||||
public static class BasicCalculationTest
|
||||
{
|
||||
/// <summary>
|
||||
/// This test uses LFMs to add and then delete an alarm.
|
||||
/// </summary>
|
||||
/// <param name="calculatorAppLfm">The LFM for the alarms app window.</param>
|
||||
public static void CalculateOnePlusTwo(this CalculatorAppLfm calculatorAppLfm)
|
||||
{
|
||||
var mainPage = calculatorAppLfm.MainPageLfm;
|
||||
|
||||
var standardCalculator = mainPage.NavigateToStandardCalculator();
|
||||
|
||||
standardCalculator.OnePlusTwoEnter();
|
||||
|
||||
Verify.AreEqual("\u202D3\u202C", standardCalculator.ObjectModel.Display.Name, "Ensure display value is 3");
|
||||
|
||||
standardCalculator.Clear();
|
||||
|
||||
Verify.AreEqual("\u202D0\u202C", standardCalculator.ObjectModel.Display.Name, "Ensure display value is 0");
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,38 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using Calculator.UIAutomationLibrary.Components;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WEX.TestExecution;
|
||||
|
||||
namespace Calculator.UIAutomationLibrary.Tests
|
||||
{
|
||||
public static class ScientificCalculationTest
|
||||
{
|
||||
/// <summary>
|
||||
/// This test uses LFMs to calculate the sqrt(4) - 2.
|
||||
/// </summary>
|
||||
/// <param name="calculatorAppLfm">The LFM for the calculator app window.</param>
|
||||
public static void CalculateSqrt4Minus2(this CalculatorAppLfm calculatorAppLfm)
|
||||
{
|
||||
var mainPage = calculatorAppLfm.MainPageLfm;
|
||||
|
||||
var scientificCalculator = mainPage.NavigateToScientificCalculator();
|
||||
|
||||
scientificCalculator.Press4();
|
||||
scientificCalculator.PressSqrt();
|
||||
scientificCalculator.PressMinus();
|
||||
scientificCalculator.Press3();
|
||||
scientificCalculator.PressPlus();
|
||||
scientificCalculator.Press1();
|
||||
scientificCalculator.PressEquals();
|
||||
|
||||
Verify.AreEqual("\u202D0\u202C", scientificCalculator.ObjectModel.Display.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user