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 3
3
<ManagePackageVersionsCentrally >true</ManagePackageVersionsCentrally >
4
4
</PropertyGroup >
5
5
<ItemGroup >
6
- <PackageVersion Include =" AspectInjector" Version =" 2.8.2 " />
6
+ <PackageVersion Include =" AspectInjector" Version =" 2.8.1 " />
7
7
<PackageVersion Include =" Amazon.Lambda.Core" Version =" 2.1.0" />
8
8
<PackageVersion Include =" AWSSDK.DynamoDBv2" Version =" 3.7.201.7" />
9
9
<PackageVersion Include =" AWSXRayRecorder.Handlers.AwsSdk" Version =" 2.12.0" />
Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Collections . Generic ;
3
+ using System . IO ;
4
+ using System . Linq ;
5
+ using System . Xml . Linq ;
6
+ using System . Xml . XPath ;
3
7
using Xunit ;
4
8
5
9
namespace AWS . Lambda . Powertools . Common . Tests ;
@@ -60,6 +64,25 @@ public void Set_Execution_Real_Environment()
60
64
Assert . Equal ( $ "{ Constants . FeatureContextIdentifier } /Tests/1.0.0", systemWrapper . GetEnvironmentVariable ( "AWS_EXECUTION_ENV" ) ) ;
61
65
}
62
66
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
+
63
86
public void Dispose ( )
64
87
{
65
88
//Do cleanup actions here
You can’t perform that action at this time.
0 commit comments