Skip to content

Commit

Permalink
Merge pull request #51 from DynamicsValue/2x-dev
Browse files Browse the repository at this point in the history
Merge to main
  • Loading branch information
jordimontana82 authored Feb 7, 2024
2 parents ad26edc + 26a35c2 commit cdaec70
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 39 deletions.
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 @@ -143,7 +143,7 @@ public IServiceProvider GetServiceProvider(IPluginExecutionContext plugCtx)
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

0 comments on commit cdaec70

Please sign in to comment.