Skip to content

Commit

Permalink
Merge pull request #8 from LogoFX/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
godrose authored Dec 5, 2021
2 parents e201d1b + 7e964a3 commit 8f6c120
Show file tree
Hide file tree
Showing 81 changed files with 1,156 additions and 286 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Core facilties
# Core facilities

<img src=https://ci.appveyor.com/api/projects/status/github/logofx/core>

Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 2.2.4.{build}
version: 2.2.5.{build}
init:
- dotnet tool install --global SpecFlow.Plus.LivingDoc.CLI
configuration: Release
Expand All @@ -17,7 +17,7 @@ after_test:
- cd devops
- cd pack
- pack-all
image: Visual Studio 2019
image: Visual Studio 2022
artifacts:
- name: Packages
path: ./output/*.nupkg
Expand Down
2 changes: 1 addition & 1 deletion devops/deploy/deploy-all.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
rem TODO: Use common source for all version instances
SET version=2.2.4
SET version=2.2.5
rem TODO: Refactor using loop and automatic discovery
call deploy-single.bat LogoFX.Core %version%
call deploy-single.bat LogoFX.Practices.IoC %version%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
<metadata>
<id>LogoFX.Client.Core.Core</id>
<version>2.2.4</version>
<version>2.2.5</version>
<title>LogoFX.Client.Core.Core</title>
<authors>Gennady Verdel, David Kossoglyad, Vlad Spivak</authors>
<owners>Gennady Verdel</owners>
Expand All @@ -14,7 +14,7 @@
<summary>LogoFX Client Core Core containing core facilities for client applications development, including implementation of INotifyPropertyChanged and ambient context for the dispatcher.</summary>
<releaseNotes>Added SetProperty functionality</releaseNotes>
<dependencies>
<dependency id="LogoFX.Core" version="2.2.4" />
<dependency id="LogoFX.Core" version="2.2.5" />
</dependencies>
<tags>framework logofx dotnet</tags>
<repository type="Open Source" url="https://github.com/LogoFX/core" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
<metadata>
<id>LogoFX.Client.Core</id>
<version>2.2.4</version>
<version>2.2.5</version>
<title>LogoFX.Client.Core</title>
<authors>Gennady Verdel, David Kossoglyad, Vlad Spivak</authors>
<owners>Gennady Verdel</owners>
Expand All @@ -14,7 +14,7 @@
<summary>LogoFX Client Core containing platform-specific utilities for client applications, including dispatcher.</summary>
<releaseNotes>Added .NET 5 support</releaseNotes>
<dependencies>
<dependency id="LogoFX.Client.Core.Core" version="2.2.4" />
<dependency id="LogoFX.Client.Core.Core" version="2.2.5" />
</dependencies>
<tags>framework logofx dotnet</tags>
<repository type="Open Source" url="https://github.com/LogoFX/core" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
<metadata>
<id>LogoFX.Client.Modularity</id>
<version>2.2.4</version>
<version>2.2.5</version>
<title>LogoFX.Client.Modularity</title>
<authors>Gennady Verdel, David Kossoglyad, Dmitry Bublik</authors>
<owners>Gennady Verdel</owners>
Expand All @@ -15,7 +15,7 @@
<releaseNotes>
</releaseNotes>
<dependencies>
<dependency id="Solid.Core" version="2.3.2" />
<dependency id="Solid.Core" version="2.3.3" />
</dependencies>
<tags>framework logofx dotnet</tags>
<repository type="Open Source" url="https://github.com/LogoFX/core" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
<metadata>
<id>LogoFX.Client.Theming</id>
<version>2.2.4</version>
<version>2.2.5</version>
<title>LogoFX.Client.Theming</title>
<authors>Dmitry Bublik, David Kossoglyad, Gennady Verdel</authors>
<owners>Gennady Verdel</owners>
Expand Down
2 changes: 1 addition & 1 deletion devops/pack/LogoFX.Core/contents/LogoFX.Core.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
<metadata>
<id>LogoFX.Core</id>
<version>2.2.4</version>
<version>2.2.5</version>
<authors>Gennady Verdel, David Kossoglyad, Vlad Spivak, Dmitry Bublik</authors>
<owners>Gennady Verdel</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
<metadata>
<id>LogoFX.Practices.IoC</id>
<version>2.2.4</version>
<version>2.2.5</version>
<title>LogoFX.Practices.IoC</title>
<authors>Gennady Verdel, David Kossoglyad, Dmitry Bublik, Vlad Spivak</authors>
<owners>Gennady Verdel</owners>
Expand All @@ -15,8 +15,8 @@
<releaseNotes>
</releaseNotes>
<dependencies>
<dependency id="LogoFX.Core" version="2.2.4" />
<dependency id="Solid.Practices.Modularity" version="2.3.2" />
<dependency id="LogoFX.Core" version="2.2.5" />
<dependency id="Solid.Practices.Modularity" version="2.3.3" />
</dependencies>
<tags>framework logofx dotnet</tags>
<repository type="Open Source" url="https://github.com/LogoFX/core" />
Expand Down
2 changes: 1 addition & 1 deletion devops/publish/publish-all.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cd ../../src
nuget restore
cd ../devops/publish
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& '../build/build-all.ps1'"
SET package_version=2.2.4
SET package_version=2.2.5
cd ../test
call test-all
cd ../pack
Expand Down
2 changes: 1 addition & 1 deletion devops/publish/publish-single.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SET package_name=%1
SET package_version=2.2.4
SET package_version=2.2.5
SET target=../../../../packages/Tests-All
cd ../build
call build-all
Expand Down
1 change: 1 addition & 0 deletions devops/test/test-all.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
call test-tests-single.bat LogoFX.Core.Tests
call test-specs-single LogoFX.Core.Specs
call test-specs-single LogoFX.Client.Core.Specs
call test-specs-single LogoFX.Client.Core.Platform.NETCore.Specs
call test-specs-single.bat LogoFX.Practices.IoC.Specs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@

Scenario: Changing single property with custom action invocation should invoke actions via custom route
Given The dispatcher is set to custom dispatcher
When The 'TestCustomActionInvocationClass' is created here with dispatcher
When The 'TestCustomActionInvocationClass' is created with dispatcher
And The number is changed to 5 via SetProperty API
Then The property change notification is raised via the custom action invocation

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 15 additions & 13 deletions src/LogoFX.Client.Core.Platform.NETCore.Specs/InvocationSteps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,49 @@
using System.Threading;
using FluentAssertions;
using LogoFX.Client.Core.Specs.Common;
using LogoFX.Core.Specs.Common;
using TechTalk.SpecFlow;

namespace LogoFX.Client.Core.Platform.NETCore.Specs
{
[Binding]
internal sealed class InvocationSteps
{
private readonly DispatcherScenarioDataStoreBase<TestPlatformDispatch> _dispatcherScenarioDataStoreBase;
private readonly InvocationScenarioDataStoreBase _invocationScenarioDataStoreBase;
private readonly DispatcherScenarioDataStore<TestPlatformDispatch> _dispatcherScenarioDataStore;
private readonly InvocationScenarioDataStore _invocationScenarioDataStore;

public InvocationSteps(ScenarioContext scenarioContext)
{
_dispatcherScenarioDataStoreBase =
new DispatcherScenarioDataStoreBase<TestPlatformDispatch>(scenarioContext);
_invocationScenarioDataStoreBase = new InvocationScenarioDataStoreBase(scenarioContext);
_dispatcherScenarioDataStore =
new DispatcherScenarioDataStore<TestPlatformDispatch>(scenarioContext);
_invocationScenarioDataStore = new InvocationScenarioDataStore(scenarioContext);
}

[Given(@"The dispatcher is set to custom dispatcher")]
public void GivenTheDispatcherIsSetToCustomDispatcher()
{
_dispatcherScenarioDataStoreBase.Dispatch = new TestPlatformDispatch(new PlatformDispatch());
_dispatcherScenarioDataStore.Dispatch = new TestPlatformDispatch(new PlatformDispatch());
}

//TODO: Merge with the same class in LogoFX.Client.Core.Specs - pay attention to different dispatcher types
[When(@"The '(.*)' is created here with dispatcher")]
public void WhenTheIsCreatedHereWithParameter(string name)
//Use Step Argument Transformation - context-dependent
[When(@"The '(.*)' is created with dispatcher")]
public void WhenTheIsCreatedWithDispatcher(string name)
{
var @class = TestClassHelper.CreateTestClassImpl(Assembly.GetExecutingAssembly(), name,
_dispatcherScenarioDataStoreBase.Dispatch);
var @class = TestClassFactory.CreateTestClass(Assembly.GetExecutingAssembly(), name,
_dispatcherScenarioDataStore.Dispatch);
if (@class != null)
{
var isCalledRef = TestClassHelper.ListenToPropertyChange(@class, "Number");
_invocationScenarioDataStoreBase.Class = @class;
_invocationScenarioDataStoreBase.IsCalledRef = isCalledRef;
_invocationScenarioDataStore.Class = @class;
_invocationScenarioDataStore.IsCalledRef = isCalledRef;
}
}

[Then(@"The property change notification is raised via the custom action invocation")]
public void ThenThePropertyChangeNotificationIsRaisedViaTheCustomActionInvocation()
{
var fakeDispatch = _dispatcherScenarioDataStoreBase.Dispatch;
var fakeDispatch = _dispatcherScenarioDataStore.Dispatch;
fakeDispatch.IsCustomActionInvoked.Should().BeTrue();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="SpecFlow" Version="3.9.22" />
<PackageReference Include="SpecFlow" Version="3.9.40" />
<PackageReference Include="SpecFlow.Plus.LivingDocPlugin" Version="3.9.57" />
<PackageReference Include="SpecFlow.Tools.MsBuild.Generation" Version="3.9.22" />
<PackageReference Include="SpecFlow.xUnit" Version="3.9.22" />
<PackageReference Include="SpecFlow.Tools.MsBuild.Generation" Version="3.9.40" />
<PackageReference Include="SpecFlow.xUnit" Version="3.9.40" />
<PackageReference Include="xunit.core" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
Expand All @@ -20,7 +20,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LogoFX.Client.Core.Platform\netcore\LogoFX.Client.Core.Platform.NETCore.csproj" />
<ProjectReference Include="..\LogoFX.Client.Core.Specs\LogoFX.Client.Core.Specs.csproj" />
<ProjectReference Include="..\LogoFX.Client.Core.Specs.Common\LogoFX.Client.Core.Specs.Common.csproj" />
<ProjectReference Include="..\LogoFX.Client.Core\LogoFX.Client.Core.csproj" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Windows.Threading;
using LogoFX.Client.Core.Specs.Common;
using LogoFX.Core;

namespace LogoFX.Client.Core.Platform.NETCore.Specs
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"plugins": [],
"stepAssemblies": [
{
"assembly": "LogoFX.Client.Core.Specs"
"assembly": "LogoFX.Client.Core.Specs.Common"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.2.4")]
[assembly: AssemblyFileVersion("2.2.4")]
[assembly: AssemblyVersion("2.2.5")]
[assembly: AssemblyFileVersion("2.2.5")]

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.2.4")]
[assembly: AssemblyFileVersion("2.2.4")]
[assembly: AssemblyVersion("2.2.5")]
[assembly: AssemblyFileVersion("2.2.5")]
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AssemblyName>LogoFX.Client.Core.Platform</AssemblyName>
<RootNamespace>LogoFX.Client.Core</RootNamespace>
<UseWPF>true</UseWPF>
<Version>2.2.4</Version>
<Version>2.2.5</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<OutputPath>..\..\Bin\net\Release</OutputPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<AssemblyName>LogoFX.Client.Core.Platform</AssemblyName>
<RootNamespace>LogoFX.Client.Core</RootNamespace>
<UseWPF>true</UseWPF>
<Version>2.2.4</Version>
<Version>2.2.5</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<OutputPath>..\..\Bin\netcore\Release</OutputPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.2.4")]
[assembly: AssemblyFileVersion("2.2.4")]
[assembly: AssemblyVersion("2.2.5")]
[assembly: AssemblyFileVersion("2.2.5")]
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.2.4")]
[assembly: AssemblyFileVersion("2.2.4")]
[assembly: AssemblyVersion("2.2.5")]
[assembly: AssemblyFileVersion("2.2.5")]
[assembly: ComVisible(false)]
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
namespace LogoFX.Client.Core.Specs.Common
{
[Binding]
public sealed class DispatcherScenarioDataStoreBase<TDispatch> : ScenarioDataStoreBase
public sealed class DispatcherScenarioDataStore<TDispatch> : ScenarioDataStoreBase
{
public DispatcherScenarioDataStoreBase(ScenarioContext scenarioContext) : base(scenarioContext)
public DispatcherScenarioDataStore(ScenarioContext scenarioContext) : base(scenarioContext)
{
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<IsPackable>false</IsPackable>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<LangVersion>8</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<LangVersion>8</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Attest.Tests.SpecFlow" Version="2.4.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LogoFX.Client.Core\LogoFX.Client.Core.csproj" />
<ProjectReference Include="..\LogoFX.Core.Specs.Common\LogoFX.Core.Specs.Common.csproj" />
</ItemGroup>
</Project>
30 changes: 30 additions & 0 deletions src/LogoFX.Client.Core.Specs.Common/NumberChangeSteps.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using LogoFX.Core.Specs.Common;
using TechTalk.SpecFlow;

namespace LogoFX.Client.Core.Specs.Common
{
[Binding]
internal sealed class NumberChangeSteps
{
private readonly InvocationScenarioDataStore _invocationScenarioDataStore;

public NumberChangeSteps(ScenarioContext scenarioContext)
{
_invocationScenarioDataStore = new InvocationScenarioDataStore(scenarioContext);
}

[When(@"The number is changed to (.*) in regular mode")]
public void WhenTheNumberIsChangedToInRegularMode(int value)
{
var @class = _invocationScenarioDataStore.Class as TestClassBase;
@class.Number = value;
}

[When(@"The number is changed to (.*) via SetProperty API")]
public void WhenTheNumberIsChangedToViaSetPropertyAPI(int value)
{
var @class = _invocationScenarioDataStore.Class as TestClassBase;
@class.Number = value;
}
}
}
Loading

0 comments on commit 8f6c120

Please sign in to comment.