chore: reorganize project and add test project

This commit is contained in:
yyc12345 committed 2026-10-02 21:44:40 +08:00
1 parent 93ea102d89
commit a5edad4aad
6 files changed
+45 -4

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace YKanBan.Tests;
/// <summary>
/// Smoke tests verifying that the test project is correctly wired to the
/// application project and that the test runner can discover and execute tests.
/// </summary>
[TestClass]
public class ProjectReferenceTests
{
/// <summary>
/// Verifies that a type defined in the application assembly can be
/// referenced from the test project.
/// </summary>
[TestMethod]
public void ApplicationAssemblyIsReferenceable()
{
Assert.IsNotNull(typeof(App));
}
}
+18
View File
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MSTest" Version="4.4.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\YKanBan\YKanBan.csproj" />
</ItemGroup>
</Project>
+1
View File
@@ -1,3 +1,4 @@
<Solution>
<Project Path="YKanBan/YKanBan.csproj" />
<Project Path="YKanBan.Tests/YKanBan.Tests.csproj" />
</Solution>
@@ -2,5 +2,4 @@
public partial class MainWindowViewModel : ViewModelBase
{
public string Greeting { get; } = "Welcome to Avalonia!";
}
-2
View File
@@ -15,6 +15,4 @@
<vm:MainWindowViewModel/>
</Design.DataContext>
<TextBlock Text="{Binding Greeting}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Window>
+5 -1
View File
@@ -9,7 +9,6 @@
</PropertyGroup>
<ItemGroup>
<Folder Include="Models\" />
<AvaloniaResource Include="Assets\**" />
</ItemGroup>
@@ -24,5 +23,10 @@
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
</PackageReference>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.1" />
<PackageReference Include="Semi.Avalonia" Version="11.2.1.10" />
<PackageReference Include="IconPacks.Avalonia.Lucide" Version="2.0.0" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="9.0.20" />
<PackageReference Include="Pidgin" Version="3.5.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
</ItemGroup>
</Project>