File tree Expand file tree Collapse file tree 4 files changed +24
-24
lines changed
tests/Files.App.UnitTests Expand file tree Collapse file tree 4 files changed +24
-24
lines changed Original file line number Diff line number Diff line change 2
2
// Licensed under the MIT License.
3
3
4
4
using Microsoft . UI . Xaml ;
5
- // using Microsoft.VisualStudio.TestTools.UnitTesting.AppContainer;
5
+ using Microsoft . VisualStudio . TestTools . UnitTesting . AppContainer ;
6
6
7
7
namespace Files . App . UnitTests
8
8
{
@@ -17,14 +17,14 @@ public App()
17
17
18
18
protected override void OnLaunched ( LaunchActivatedEventArgs args )
19
19
{
20
- // Microsoft.VisualStudio.TestPlatform.TestExecutor.UnitTestClient.CreateDefaultUI();
20
+ Microsoft . VisualStudio . TestPlatform . TestExecutor . UnitTestClient . CreateDefaultUI ( ) ;
21
21
22
22
_window = new MainWindow ( ) ;
23
23
_window . Activate ( ) ;
24
24
25
- // UITestMethodAttribute.DispatcherQueue = _window.DispatcherQueue;
25
+ UITestMethodAttribute . DispatcherQueue = _window . DispatcherQueue ;
26
26
27
- // Microsoft.VisualStudio.TestPlatform.TestExecutor.UnitTestClient.Run(Environment.CommandLine);
27
+ Microsoft . VisualStudio . TestPlatform . TestExecutor . UnitTestClient . Run ( System . Environment . CommandLine ) ;
28
28
}
29
29
}
30
30
}
Original file line number Diff line number Diff line change 21
21
<ItemGroup >
22
22
<Manifest Include =" $(ApplicationManifest)" />
23
23
<Content Include =" Assets\*.png" />
24
- <!-- < ProjectCapability Include="TestContainer" /> -- >
24
+ <ProjectCapability Include =" TestContainer" />
25
25
<ProjectCapability Condition =" '$(DisableMsixProjectCapabilityAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'" Include =" Msix" />
26
26
</ItemGroup >
27
27
28
28
<ItemGroup >
29
- <!-- < PackageReference Include="Microsoft.TestPlatform.TestHost" />
29
+ <PackageReference Include =" Microsoft.TestPlatform.TestHost" />
30
30
<PackageReference Include =" MSTest.TestAdapter" />
31
- <PackageReference Include="MSTest.TestFramework" />-->
31
+ <PackageReference Include =" MSTest.TestFramework" />
32
32
<PackageReference Include =" Microsoft.Windows.SDK.BuildTools" />
33
33
<PackageReference Include =" Microsoft.WindowsAppSDK" />
34
34
</ItemGroup >
35
35
36
- <!-- < ItemGroup>
36
+ <ItemGroup >
37
37
<ProjectReference Include =" ..\..\src\Files.App.CsWin32\Files.App.CsWin32.csproj" />
38
38
<ProjectReference Include =" ..\..\src\Files.App.Storage\Files.App.Storage.csproj" />
39
39
<ProjectReference Include =" ..\..\src\Files.Shared\Files.Shared.csproj" />
40
- </ItemGroup>-->
40
+ </ItemGroup >
41
41
42
42
</Project >
Original file line number Diff line number Diff line change 8
8
<Identity
9
9
Name="f20f07f5-b301-4f12-92af-febb4e36abaf"
10
10
Publisher="CN=Files Community"
11
- Version="1.0.0 .0" />
11
+ Version="1.0.2 .0" />
12
12
13
13
<Properties>
14
14
<DisplayName>Files Unit Test WinUI app</DisplayName>
Original file line number Diff line number Diff line change 2
2
// Licensed under the MIT License.
3
3
4
4
using Microsoft . UI . Xaml . Controls ;
5
- // using Microsoft.VisualStudio.TestTools.UnitTesting;
6
- // using Microsoft.VisualStudio.TestTools.UnitTesting.AppContainer;
5
+ using Microsoft . VisualStudio . TestTools . UnitTesting ;
6
+ using Microsoft . VisualStudio . TestTools . UnitTesting . AppContainer ;
7
7
8
8
namespace App1
9
9
{
10
- // [TestClass]
10
+ [ TestClass ]
11
11
public class UnitTest1
12
12
{
13
- // [TestMethod]
14
- // public void TestMethod1()
15
- // {
16
- // Assert.AreEqual(0, 0);
17
- // }
13
+ [ TestMethod ]
14
+ public void TestMethod1 ( )
15
+ {
16
+ Assert . AreEqual ( 0 , 0 ) ;
17
+ }
18
18
19
- // [UITestMethod]
20
- // public void TestMethod2()
21
- // {
22
- // var grid = new Grid();
23
- // Assert.AreEqual(0, grid.MinWidth);
24
- // }
19
+ [ UITestMethod ]
20
+ public void TestMethod2 ( )
21
+ {
22
+ var grid = new Grid ( ) ;
23
+ Assert . AreEqual ( 0 , grid . MinWidth ) ;
24
+ }
25
25
}
26
26
}
You can’t perform that action at this time.
0 commit comments