From a5edad4aad66ed327e2c691f7e1992d6e4214622 Mon Sep 17 00:00:00 2001 From: yyc12345 Date: Fri, 2 Oct 2026 21:44:40 +0800 Subject: [PATCH] chore: reorganize project and add test project --- YKanBan.Tests/ProjectReferenceTests.cs | 21 +++++++++++++++++++++ YKanBan.Tests/YKanBan.Tests.csproj | 18 ++++++++++++++++++ YKanBan.slnx | 1 + YKanBan/ViewModels/MainWindowViewModel.cs | 1 - YKanBan/Views/MainWindow.axaml | 2 -- YKanBan/YKanBan.csproj | 6 +++++- 6 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 YKanBan.Tests/ProjectReferenceTests.cs create mode 100644 YKanBan.Tests/YKanBan.Tests.csproj diff --git a/YKanBan.Tests/ProjectReferenceTests.cs b/YKanBan.Tests/ProjectReferenceTests.cs new file mode 100644 index 0000000..a33704f --- /dev/null +++ b/YKanBan.Tests/ProjectReferenceTests.cs @@ -0,0 +1,21 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace YKanBan.Tests; + +/// +/// Smoke tests verifying that the test project is correctly wired to the +/// application project and that the test runner can discover and execute tests. +/// +[TestClass] +public class ProjectReferenceTests +{ + /// + /// Verifies that a type defined in the application assembly can be + /// referenced from the test project. + /// + [TestMethod] + public void ApplicationAssemblyIsReferenceable() + { + Assert.IsNotNull(typeof(App)); + } +} diff --git a/YKanBan.Tests/YKanBan.Tests.csproj b/YKanBan.Tests/YKanBan.Tests.csproj new file mode 100644 index 0000000..8e7c5a6 --- /dev/null +++ b/YKanBan.Tests/YKanBan.Tests.csproj @@ -0,0 +1,18 @@ + + + + net9.0 + enable + false + true + + + + + + + + + + + diff --git a/YKanBan.slnx b/YKanBan.slnx index c37ab03..abbc2a8 100644 --- a/YKanBan.slnx +++ b/YKanBan.slnx @@ -1,3 +1,4 @@ + diff --git a/YKanBan/ViewModels/MainWindowViewModel.cs b/YKanBan/ViewModels/MainWindowViewModel.cs index 68fb1ed..dd8a2fd 100644 --- a/YKanBan/ViewModels/MainWindowViewModel.cs +++ b/YKanBan/ViewModels/MainWindowViewModel.cs @@ -2,5 +2,4 @@ public partial class MainWindowViewModel : ViewModelBase { - public string Greeting { get; } = "Welcome to Avalonia!"; } diff --git a/YKanBan/Views/MainWindow.axaml b/YKanBan/Views/MainWindow.axaml index 2233ddf..37eb7d8 100644 --- a/YKanBan/Views/MainWindow.axaml +++ b/YKanBan/Views/MainWindow.axaml @@ -15,6 +15,4 @@ - - diff --git a/YKanBan/YKanBan.csproj b/YKanBan/YKanBan.csproj index bd99f8a..1ba36d1 100644 --- a/YKanBan/YKanBan.csproj +++ b/YKanBan/YKanBan.csproj @@ -9,7 +9,6 @@ - @@ -24,5 +23,10 @@ All + + + + +