From c0f4b69d80e2f7b2087c0c3135782af1e7175af8 Mon Sep 17 00:00:00 2001 From: Alex Macocian Date: Wed, 14 May 2025 12:18:38 +0200 Subject: [PATCH] Fix tests --- WpfExtended.SourceGeneration.Tests/Class1.cs | 41 ------------------- .../Launcher.cs | 15 ------- .../WpfExtended.SourceGeneration.Tests.csproj | 20 --------- WpfExtended.Test/TestApplication/Launcher.cs | 1 - WpfExtended.Test/WpfExtended.Tests.csproj | 18 ++++---- WpfExtended.sln | 10 +---- 6 files changed, 11 insertions(+), 94 deletions(-) delete mode 100644 WpfExtended.SourceGeneration.Tests/Class1.cs delete mode 100644 WpfExtended.SourceGeneration.Tests/Launcher.cs delete mode 100644 WpfExtended.SourceGeneration.Tests/WpfExtended.SourceGeneration.Tests.csproj diff --git a/WpfExtended.SourceGeneration.Tests/Class1.cs b/WpfExtended.SourceGeneration.Tests/Class1.cs deleted file mode 100644 index 174e9f2..0000000 --- a/WpfExtended.SourceGeneration.Tests/Class1.cs +++ /dev/null @@ -1,41 +0,0 @@ -using FluentAssertions; -using System.ComponentModel; -using System.Windows.Controls; -using System.Windows.Extensions; -using System.Windows.Media.Effects; - -namespace WpfExtended.SourceGeneration.Tests; - -internal partial class Class1 : UserControl, INotifyPropertyChanged -{ - public event PropertyChangedEventHandler PropertyChanged; - - private bool calledEvent; - - [GenerateDependencyProperty] - public int someF; - [GenerateDependencyProperty(InitialValue = "This has a value")] - public string someValue; - [GenerateDependencyProperty] - public Effect effect; - [GenerateNotifyPropertyChanged] - public string someNotifyingValue; - - - public void TestValues() - { - this.PropertyChanged += Class1_PropertyChanged; - this.SomeF.Should().Be(0); - this.SomeValue.Should().Be("This has a value"); - this.Effect.Should().BeNull(); - - this.SomeNotifyingValue = "NewValue"; - this.calledEvent.Should().BeTrue(); - this.someNotifyingValue.Should().Be("NewValue"); - } - - private void Class1_PropertyChanged(object sender, PropertyChangedEventArgs e) - { - this.calledEvent = true; - } -} diff --git a/WpfExtended.SourceGeneration.Tests/Launcher.cs b/WpfExtended.SourceGeneration.Tests/Launcher.cs deleted file mode 100644 index 7610c60..0000000 --- a/WpfExtended.SourceGeneration.Tests/Launcher.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; - -namespace WpfExtended.SourceGeneration.Tests -{ - public class Launcher - { - [STAThread] - public static int Main() - { - var cls = new Class1(); - cls.TestValues(); - return 0; - } - } -} diff --git a/WpfExtended.SourceGeneration.Tests/WpfExtended.SourceGeneration.Tests.csproj b/WpfExtended.SourceGeneration.Tests/WpfExtended.SourceGeneration.Tests.csproj deleted file mode 100644 index afe6b99..0000000 --- a/WpfExtended.SourceGeneration.Tests/WpfExtended.SourceGeneration.Tests.csproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - net8.0-windows - true - preview - Exe - true - obj - - - - - - - - - - - diff --git a/WpfExtended.Test/TestApplication/Launcher.cs b/WpfExtended.Test/TestApplication/Launcher.cs index d9407ca..20248ff 100644 --- a/WpfExtended.Test/TestApplication/Launcher.cs +++ b/WpfExtended.Test/TestApplication/Launcher.cs @@ -5,7 +5,6 @@ using Slim; using Slim.Integration.ServiceCollection; using System; using System.Extensions; -using System.Http; using System.Logging; using System.Net.Http; using System.Windows.Extensions; diff --git a/WpfExtended.Test/WpfExtended.Tests.csproj b/WpfExtended.Test/WpfExtended.Tests.csproj index a580f7d..82e5bfc 100644 --- a/WpfExtended.Test/WpfExtended.Tests.csproj +++ b/WpfExtended.Test/WpfExtended.Tests.csproj @@ -8,15 +8,15 @@ - - - - - - - - - + + + + + + + + + diff --git a/WpfExtended.sln b/WpfExtended.sln index 83947e9..d9091c8 100644 --- a/WpfExtended.sln +++ b/WpfExtended.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30804.86 +# Visual Studio Version 17 +VisualStudioVersion = 17.13.35919.96 d17.13 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfExtended", "WpfExtended\WpfExtended.csproj", "{E822AE0D-5EA1-4C61-A1DC-76CF73C8A524}" EndProject @@ -9,8 +9,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfExtended.Tests", "WpfExt EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfExtended.SourceGeneration", "WpfExtended.SourceGeneration\WpfExtended.SourceGeneration.csproj", "{BB890187-DF49-4E58-AE41-09C40F541292}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfExtended.SourceGeneration.Tests", "WpfExtended.SourceGeneration.Tests\WpfExtended.SourceGeneration.Tests.csproj", "{BDD41E4C-3F5D-4734-8BD2-62B444E4845D}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -29,10 +27,6 @@ Global {BB890187-DF49-4E58-AE41-09C40F541292}.Debug|Any CPU.Build.0 = Debug|Any CPU {BB890187-DF49-4E58-AE41-09C40F541292}.Release|Any CPU.ActiveCfg = Release|Any CPU {BB890187-DF49-4E58-AE41-09C40F541292}.Release|Any CPU.Build.0 = Release|Any CPU - {BDD41E4C-3F5D-4734-8BD2-62B444E4845D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BDD41E4C-3F5D-4734-8BD2-62B444E4845D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BDD41E4C-3F5D-4734-8BD2-62B444E4845D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BDD41E4C-3F5D-4734-8BD2-62B444E4845D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE