File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed
tests/AWS.Lambda.Powertools.Common.Tests/Core Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 33 <ManagePackageVersionsCentrally >true</ManagePackageVersionsCentrally >
44 </PropertyGroup >
55 <ItemGroup >
6- <PackageVersion Include =" AspectInjector" Version =" 2.8.2 " />
6+ <PackageVersion Include =" AspectInjector" Version =" 2.8.1 " />
77 <PackageVersion Include =" Amazon.Lambda.Core" Version =" 2.1.0" />
88 <PackageVersion Include =" AWSSDK.DynamoDBv2" Version =" 3.7.201.7" />
99 <PackageVersion Include =" AWSXRayRecorder.Handlers.AwsSdk" Version =" 2.12.0" />
Original file line number Diff line number Diff line change 11using System ;
22using System . Collections . Generic ;
3+ using System . IO ;
4+ using System . Linq ;
5+ using System . Xml . Linq ;
6+ using System . Xml . XPath ;
37using Xunit ;
48
59namespace AWS . Lambda . Powertools . Common . Tests ;
@@ -60,6 +64,25 @@ public void Set_Execution_Real_Environment()
6064 Assert . Equal ( $ "{ Constants . FeatureContextIdentifier } /Tests/1.0.0", systemWrapper . GetEnvironmentVariable ( "AWS_EXECUTION_ENV" ) ) ;
6165 }
6266
67+ [ Fact ]
68+ public void Should_Use_Aspect_Injector_281 ( )
69+ {
70+ // This test must be present until Issue: https://github.com/pamidur/aspect-injector/issues/220 is fixed
71+
72+ var directory = Path . GetFullPath ( "../../../../../src/Directory.Packages.props" ) ;
73+ var doc = XDocument . Load ( directory ) ;
74+
75+ var packageReference = doc . XPathSelectElements ( "//PackageVersion" )
76+ . Select ( pr => new
77+ {
78+ Include = pr . Attribute ( "Include" ) ! . Value ,
79+ Version = new Version ( pr . Attribute ( "Version" ) ! . Value )
80+ } ) . FirstOrDefault ( x => x . Include == "AspectInjector" ) ;
81+
82+ Assert . NotNull ( packageReference ) ;
83+ Assert . Equal ( "2.8.1" , packageReference . Version . ToString ( ) ) ;
84+ }
85+
6386 public void Dispose ( )
6487 {
6588 //Do cleanup actions here
You can’t perform that action at this time.
0 commit comments