cleanup test suite properly

This commit is contained in:
Tian Liao 2024-11-19 15:03:59 +08:00
commit d9ef1ed5b2
2 changed files with 5 additions and 1 deletions

View file

@ -15,6 +15,8 @@ namespace CalculatorUITestFramework
{
Prefixes =
{
// to trust below URL on your dev machine, run below command in cmd as admin
// netsh http add urlacl url="http://localhost:80/calctesting/file" user=everyone
"http://localhost/calctesting/file/",
}
};

View file

@ -10,6 +10,7 @@ namespace CalculatorUITests
public class CurrencyConverterFunctionalTests
{
private static readonly UnitConverterPage page = new UnitConverterPage();
private static MockedCurrencyServer _currencyServer;
public TestContext TestContext { get; set; }
@ -22,7 +23,7 @@ namespace CalculatorUITests
{
// Create session to launch a Calculator window
CalculatorDriver.Instance.SetupCalculatorSession(context);
context.Properties.Add("MockedDataServer", new MockedCurrencyServer());
_currencyServer = new MockedCurrencyServer();
}
/// <summary>
@ -33,6 +34,7 @@ namespace CalculatorUITests
{
// Tear down Calculator session.
CalculatorDriver.Instance.TearDownCalculatorSession();
_currencyServer.Dispose();
}
/// <summary>