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 22// Licensed under the MIT License.
33
44using Microsoft . UI . Xaml ;
5- // using Microsoft.VisualStudio.TestTools.UnitTesting.AppContainer;
5+ using Microsoft . VisualStudio . TestTools . UnitTesting . AppContainer ;
66
77namespace Files . App . UnitTests
88{
@@ -17,14 +17,14 @@ public App()
1717
1818 protected override void OnLaunched ( LaunchActivatedEventArgs args )
1919 {
20- // Microsoft.VisualStudio.TestPlatform.TestExecutor.UnitTestClient.CreateDefaultUI();
20+ Microsoft . VisualStudio . TestPlatform . TestExecutor . UnitTestClient . CreateDefaultUI ( ) ;
2121
2222 _window = new MainWindow ( ) ;
2323 _window . Activate ( ) ;
2424
25- // UITestMethodAttribute.DispatcherQueue = _window.DispatcherQueue;
25+ UITestMethodAttribute . DispatcherQueue = _window . DispatcherQueue ;
2626
27- // Microsoft.VisualStudio.TestPlatform.TestExecutor.UnitTestClient.Run(Environment.CommandLine);
27+ Microsoft . VisualStudio . TestPlatform . TestExecutor . UnitTestClient . Run ( System . Environment . CommandLine ) ;
2828 }
2929 }
3030}
Original file line number Diff line number Diff line change 2121 <ItemGroup >
2222 <Manifest Include =" $(ApplicationManifest)" />
2323 <Content Include =" Assets\*.png" />
24- <!-- < ProjectCapability Include="TestContainer" /> -- >
24+ <ProjectCapability Include =" TestContainer" />
2525 <ProjectCapability Condition =" '$(DisableMsixProjectCapabilityAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'" Include =" Msix" />
2626 </ItemGroup >
2727
2828 <ItemGroup >
29- <!-- < PackageReference Include="Microsoft.TestPlatform.TestHost" />
29+ <PackageReference Include =" Microsoft.TestPlatform.TestHost" />
3030 <PackageReference Include =" MSTest.TestAdapter" />
31- <PackageReference Include="MSTest.TestFramework" />-->
31+ <PackageReference Include =" MSTest.TestFramework" />
3232 <PackageReference Include =" Microsoft.Windows.SDK.BuildTools" />
3333 <PackageReference Include =" Microsoft.WindowsAppSDK" />
3434 </ItemGroup >
3535
36- <!-- < ItemGroup>
36+ <ItemGroup >
3737 <ProjectReference Include =" ..\..\src\Files.App.CsWin32\Files.App.CsWin32.csproj" />
3838 <ProjectReference Include =" ..\..\src\Files.App.Storage\Files.App.Storage.csproj" />
3939 <ProjectReference Include =" ..\..\src\Files.Shared\Files.Shared.csproj" />
40- </ItemGroup>-->
40+ </ItemGroup >
4141
4242</Project >
Original file line number Diff line number Diff line change 88 <Identity
99 Name="f20f07f5-b301-4f12-92af-febb4e36abaf"
1010 Publisher="CN=Files Community"
11- Version="1.0.0 .0" />
11+ Version="1.0.2 .0" />
1212
1313 <Properties>
1414 <DisplayName>Files Unit Test WinUI app</DisplayName>
Original file line number Diff line number Diff line change 22// Licensed under the MIT License.
33
44using 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 ;
77
88namespace App1
99{
10- // [TestClass]
10+ [ TestClass ]
1111 public class UnitTest1
1212 {
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+ }
1818
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+ }
2525 }
2626}
You can’t perform that action at this time.
0 commit comments