Skip to content

Commit 70e4ac3

Browse files
committed
Added get description of missing dependencies
Helper method to use in most common scenarios
1 parent bf8b18b commit 70e4ac3

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

ConventionTests/ConventionTests.NUnit.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
using ApprovalTests.Core;
77
using ApprovalTests.Namers;
88
using Castle.MicroKernel;
9+
using Castle.MicroKernel.Handlers;
910
using Castle.Windsor;
1011
using Castle.Windsor.Diagnostics;
12+
using Castle.Windsor.Diagnostics.DebuggerViews;
1113
using Castle.Windsor.Diagnostics.Helpers;
1214
using NUnit.Framework;
1315
using Approvals = ApprovalTests.Approvals;
@@ -178,6 +180,12 @@ public override void Execute()
178180
}
179181
}
180182

183+
protected string MissingDependenciesDescription(IHandler var)
184+
{
185+
var item = new ComponentStatusDebuggerViewItem((IExposeDependencyInfo) var);
186+
return item.Message;
187+
}
188+
181189
private TDiagnosticData[] GetDataToTest(WindsorConventionData<TDiagnosticData> data)
182190
{
183191
var host = data.Kernel.GetSubSystem(SubSystemConstants.DiagnosticsKey) as IDiagnosticsHost;

0 commit comments

Comments
 (0)