Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge to main #51

Merged
merged 2 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
## [2.4.1]

### Changed

- Fix for GetServiceProvider should return null for unsupported types - https://github.com/DynamicsValue/fake-xrm-easy/issues/127

## [2.4.0]

## Added
### Added

- **Alpha**: Introduced subscription usage monitoring based on customer feedback

## Changed
### Changed

- Set default build configuration in solution file to FAKE_XRM_EASY_9
- build.ps1 improvements: do not build project twice (added --no-build) when running dotnet test, do not build again either when packing assemblies either: https://github.com/DynamicsValue/fake-xrm-easy/issues/119
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,33 +90,33 @@
</ItemGroup>

<ItemGroup Condition="'$(PackTests)' == 'true' And '$(Configuration)'=='FAKE_XRM_EASY'">
<PackageReference Include="FakeXrmEasy.Abstractions.v2011" Version="[2.3.3-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Core.v2011" Version="[2.3.3-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Plugins.v2011" Version="[2.3.3-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Abstractions.v2011" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Core.v2011" Version="[2.4.1-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Plugins.v2011" Version="[2.4.0-*,3.0)" />
</ItemGroup>
<ItemGroup Condition="'$(PackTests)' == 'true' And '$(Configuration)'=='FAKE_XRM_EASY_2013'">
<PackageReference Include="FakeXrmEasy.Abstractions.v2013" Version="[2.3.3-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Core.v2013" Version="[2.3.3-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Plugins.v2013" Version="[2.3.3-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Abstractions.v2013" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Core.v2013" Version="[2.4.1-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Plugins.v2013" Version="[2.4.0-*,3.0)" />
</ItemGroup>
<ItemGroup Condition="'$(PackTests)' == 'true' And '$(Configuration)'=='FAKE_XRM_EASY_2015'">
<PackageReference Include="FakeXrmEasy.Abstractions.v2015" Version="[2.3.3-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Core.v2015" Version="[2.3.3-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Plugins.v2015" Version="[2.3.3-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Abstractions.v2015" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Core.v2015" Version="[2.4.1-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Plugins.v2015" Version="[2.4.0-*,3.0)" />
</ItemGroup>
<ItemGroup Condition="'$(PackTests)' == 'true' And '$(Configuration)'=='FAKE_XRM_EASY_2016'">
<PackageReference Include="FakeXrmEasy.Abstractions.v2016" Version="[2.3.3-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Core.v2016" Version="[2.3.3-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Plugins.v2016" Version="[2.3.3-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Abstractions.v2016" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Core.v2016" Version="[2.4.1-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Plugins.v2016" Version="[2.4.0-*,3.0)" />
</ItemGroup>
<ItemGroup Condition="'$(PackTests)' == 'true' And '$(Configuration)'=='FAKE_XRM_EASY_365'">
<PackageReference Include="FakeXrmEasy.Abstractions.v365" Version="[2.3.3-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Core.v365" Version="[2.3.3-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Plugins.v365" Version="[2.3.3-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Abstractions.v365" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Core.v365" Version="[2.4.1-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Plugins.v365" Version="[2.4.0-*,3.0)" />
</ItemGroup>
<ItemGroup Condition="'$(PackTests)' == 'true' And '$(Configuration)'=='FAKE_XRM_EASY_9'">
<PackageReference Include="FakeXrmEasy.Abstractions.v9" Version="[2.3.3-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Core.v9" Version="[2.3.3-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Plugins.v9" Version="[2.3.3-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Abstractions.v9" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Core.v9" Version="[2.4.1-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Plugins.v9" Version="[2.4.0-*,3.0)" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/FakeXrmEasy.Plugins/FakeXrmEasy.Plugins.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<TargetFrameworks Condition="'$(Configuration)'=='FAKE_XRM_EASY_2013'">net452</TargetFrameworks>
<TargetFrameworks Condition="'$(Configuration)'=='FAKE_XRM_EASY'">net452</TargetFrameworks>
<PackageId>FakeXrmEasy.Plugins</PackageId>
<VersionPrefix>2.4.0</VersionPrefix>
<VersionPrefix>2.4.1</VersionPrefix>
<Authors>Jordi Montaña</Authors>
<Company>Dynamics Value</Company>
<Title>FakeXrmEasy Plugins</Title>
Expand Down
2 changes: 1 addition & 1 deletion src/FakeXrmEasy.Plugins/XrmFakedPluginContextProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@
protected readonly IXrmFakedTracingService _tracingService;

#if FAKE_XRM_EASY_9
protected readonly IEntityDataSourceRetrieverService _entityDataSourceRetrieverService;

Check warning on line 35 in src/FakeXrmEasy.Plugins/XrmFakedPluginContextProperties.cs

View workflow job for this annotation

GitHub Actions / build-windows (FAKE_XRM_EASY_9)

Missing XML comment for publicly visible type or member 'XrmFakedPluginContextProperties._entityDataSourceRetrieverService'

Check warning on line 35 in src/FakeXrmEasy.Plugins/XrmFakedPluginContextProperties.cs

View workflow job for this annotation

GitHub Actions / pack-push

Missing XML comment for publicly visible type or member 'XrmFakedPluginContextProperties._entityDataSourceRetrieverService'
/// <summary>
/// Plugin telemetry logger service
/// </summary>
protected ILogger _loggerService;
#endif

protected readonly IOrganizationServiceFactory _organizationServiceFactory;

Check warning on line 42 in src/FakeXrmEasy.Plugins/XrmFakedPluginContextProperties.cs

View workflow job for this annotation

GitHub Actions / build-windows (FAKE_XRM_EASY_2016)

Missing XML comment for publicly visible type or member 'XrmFakedPluginContextProperties._organizationServiceFactory'

Check warning on line 42 in src/FakeXrmEasy.Plugins/XrmFakedPluginContextProperties.cs

View workflow job for this annotation

GitHub Actions / build-windows (FAKE_XRM_EASY)

Missing XML comment for publicly visible type or member 'XrmFakedPluginContextProperties._organizationServiceFactory'

Check warning on line 42 in src/FakeXrmEasy.Plugins/XrmFakedPluginContextProperties.cs

View workflow job for this annotation

GitHub Actions / build-windows (FAKE_XRM_EASY_2013)

Missing XML comment for publicly visible type or member 'XrmFakedPluginContextProperties._organizationServiceFactory'

Check warning on line 42 in src/FakeXrmEasy.Plugins/XrmFakedPluginContextProperties.cs

View workflow job for this annotation

GitHub Actions / build-windows (FAKE_XRM_EASY_2015)

Missing XML comment for publicly visible type or member 'XrmFakedPluginContextProperties._organizationServiceFactory'

Check warning on line 42 in src/FakeXrmEasy.Plugins/XrmFakedPluginContextProperties.cs

View workflow job for this annotation

GitHub Actions / build-windows (FAKE_XRM_EASY_365)

Missing XML comment for publicly visible type or member 'XrmFakedPluginContextProperties._organizationServiceFactory'

Check warning on line 42 in src/FakeXrmEasy.Plugins/XrmFakedPluginContextProperties.cs

View workflow job for this annotation

GitHub Actions / pack-push

Missing XML comment for publicly visible type or member 'XrmFakedPluginContextProperties._organizationServiceFactory'

Check warning on line 42 in src/FakeXrmEasy.Plugins/XrmFakedPluginContextProperties.cs

View workflow job for this annotation

GitHub Actions / pack-push

Missing XML comment for publicly visible type or member 'XrmFakedPluginContextProperties._organizationServiceFactory'
protected readonly IServiceEndpointNotificationService _serviceEndpointNotificationService;

/// <summary>
Expand Down Expand Up @@ -143,7 +143,7 @@
return _entityDataSourceRetrieverService;
}
#endif
throw UnsupportedExceptionFactory.New(_context.LicenseContext.Value, "The specified service type is not supported");
return null;
});

return fakedServiceProvider;
Expand Down
28 changes: 14 additions & 14 deletions tests/FakeXrmEasy.Plugins.Tests/FakeXrmEasy.Plugins.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -125,37 +125,37 @@

<ItemGroup Condition="'$(PackTests)' == 'true' And '$(Configuration)'=='FAKE_XRM_EASY'">
<PackageReference Include="FakeXrmEasy.Abstractions.v2011" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Core.v2011" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Plugins.v2011" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Core.v2011" Version="[2.4.1-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Plugins.v2011" Version="[2.4.1-*,3.0)" />
</ItemGroup>
<ItemGroup Condition="'$(PackTests)' == 'true' And '$(Configuration)'=='FAKE_XRM_EASY_2013'">
<PackageReference Include="FakeXrmEasy.Abstractions.v2013" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Core.v2013" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Plugins.v2013" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Core.v2013" Version="[2.4.1-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Plugins.v2013" Version="[2.4.1-*,3.0)" />
</ItemGroup>
<ItemGroup Condition="'$(PackTests)' == 'true' And '$(Configuration)'=='FAKE_XRM_EASY_2015'">
<PackageReference Include="FakeXrmEasy.Abstractions.v2015" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Core.v2015" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Plugins.v2015" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Core.v2015" Version="[2.4.1-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Plugins.v2015" Version="[2.4.1-*,3.0)" />
</ItemGroup>
<ItemGroup Condition="'$(PackTests)' == 'true' And '$(Configuration)'=='FAKE_XRM_EASY_2016'">
<PackageReference Include="FakeXrmEasy.Abstractions.v2016" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Core.v2016" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Plugins.v2016" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Core.v2016" Version="[2.4.1-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Plugins.v2016" Version="[2.4.1-*,3.0)" />
</ItemGroup>
<ItemGroup Condition="'$(PackTests)' == 'true' And '$(Configuration)'=='FAKE_XRM_EASY_365'">
<PackageReference Include="FakeXrmEasy.Abstractions.v365" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Core.v365" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Plugins.v365" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Core.v365" Version="[2.4.1-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Plugins.v365" Version="[2.4.1-*,3.0)" />
</ItemGroup>
<ItemGroup Condition="'$(PackTests)' == 'true' And '$(Configuration)'=='FAKE_XRM_EASY_9'">
<PackageReference Include="FakeXrmEasy.Abstractions.v9" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Core.v9" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Plugins.v9" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Core.v9" Version="[2.4.1-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Plugins.v9" Version="[2.4.1-*,3.0)" />
</ItemGroup>
<ItemGroup Condition="'$(PackTests)' == 'true' And '$(Configuration)'=='Debug'">
<PackageReference Include="FakeXrmEasy.Abstractions.v9" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Core.v9" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Plugins.v9" Version="[2.4.0-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Core.v9" Version="[2.4.1-*,3.0)" />
<PackageReference Include="FakeXrmEasy.Plugins.v9" Version="[2.4.1-*,3.0)" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,14 @@ public void Retrieving_The_TracingService_Twice_Should_Return_The_Same_Instance(
}

[Fact]
public void Should_return_unsupported_exception_when_getting_an_invalid_service()
public void Should_return_null_when_getting_an_invalid_service()
{
_context.PluginContextProperties = new XrmFakedPluginContextProperties(_context, _context.GetOrganizationService(), _context.GetTracingService());

var serviceProvider = _context.PluginContextProperties.GetServiceProvider(_context.GetDefaultPluginContext());

Assert.Throws<OpenSourceUnsupportedException>(() => serviceProvider.GetService(typeof(XrmFakedPluginContextPropertiesTests)));
var service = serviceProvider.GetService(typeof(XrmFakedPluginContextPropertiesTests));

Assert.Null(service);
}

[Fact]
Expand Down
Loading