-
Notifications
You must be signed in to change notification settings - Fork 351
/
Copy pathTestClass.cs
62 lines (52 loc) · 1.57 KB
/
TestClass.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System.Diagnostics;
namespace DevHome.Test;
/*
* TODO: Write unit tests.
* https://docs.microsoft.com/visualstudio/test/getting-started-with-unit-testing
* https://docs.microsoft.com/visualstudio/test/using-microsoft-visualstudio-testtools-unittesting-members-in-unit-tests
* https://docs.microsoft.com/visualstudio/test/run-unit-tests-with-test-explorer
* https://github.com/microsoft/devhome/issues/604
*/
[TestClass]
public class TestClass
{
[ClassInitialize]
public static void ClassInitialize(TestContext context)
{
Debug.WriteLine("ClassInitialize");
}
[ClassCleanup]
public static void ClassCleanup()
{
Debug.WriteLine("ClassCleanup");
}
[TestInitialize]
public void TestInitialize()
{
Debug.WriteLine("TestInitialize");
}
[TestCleanup]
public void TestCleanup()
{
Debug.WriteLine("TestCleanup");
}
[TestMethod]
public void TestMethod()
{
Assert.IsTrue(true);
}
[TestMethod]
public void TestHelpersIngestion()
{
Microsoft.Internal.Windows.DevHome.Helpers.Helpers helpers = new();
Assert.AreEqual("This is a test", helpers.Test());
}
[TestMethod]
public void TestExperimentHelpers_UnrecognizedKey_ReturnFalse()
{
Microsoft.Internal.Windows.DevHome.Helpers.Experimentation.Experiment experiment = new();
Assert.IsFalse(experiment.IsEnabled("unknown_key"));
}
}