Skip to content

Commit 29421f6

Browse files
Test for multiple interface constraints for type.
1 parent fc04dfb commit 29421f6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

LazyProxy.Tests/LazyProxyBuilderTests.cs

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public interface IBaseArgument { }
1111

1212
public interface IOtherBaseArgument { }
1313

14-
public abstract class BaseArgument : IBaseArgument { }
14+
public abstract class BaseArgument : IBaseArgument, IOtherBaseArgument { }
1515

1616
public abstract class BaseArgument2 { }
1717

@@ -58,7 +58,7 @@ string GenericMethod<T1, T2, T3>(string arg)
5858

5959
// ReSharper disable once MemberCanBePrivate.Global
6060
public interface IGenericTestService<T, in TIn, out TOut>
61-
where T : class, IBaseArgument, new()
61+
where T : class, IBaseArgument, IOtherBaseArgument, new()
6262
where TIn : struct
6363
where TOut : BaseArgument2, IBaseArgument
6464
{
@@ -408,7 +408,6 @@ public void GenericInterfaceWithDifferentTypeParametersMustBeCreatedWithoutExcep
408408
LazyProxyBuilder.GetType(typeof(IGenericTestService<,,>));
409409
LazyProxyBuilder.GetType<IGenericTestService<TestArgument2, TestArgument, TestArgument4>>();
410410
LazyProxyBuilder.GetType<IGenericTestService<TestArgument3, TestArgument, TestArgument4>>();
411-
412411
});
413412

414413
Assert.Null(exception);

0 commit comments

Comments
 (0)