diff --git a/src/Lamar.Testing/Bugs/Bug_340_open_generic_interface_registration_check.cs b/src/Lamar.Testing/Bugs/Bug_340_open_generic_interface_registration_check.cs new file mode 100644 index 00000000..518e11fe --- /dev/null +++ b/src/Lamar.Testing/Bugs/Bug_340_open_generic_interface_registration_check.cs @@ -0,0 +1,30 @@ +using Shouldly; +using Xunit; + +namespace Lamar.Testing.Bugs; + +public class Bug_340_open_generic_interface_registration_check +{ + class ClassA {} + + interface IGenericService {} + + class ServiceA : IGenericService {} + + [Fact] + public void Test_it() + { + var container = new Container(x => + { + x.For>().Use(); + }); + + var x = container.GetInstance>(); + + container.GetInstance>() + .ShouldNotBeNull(); + + container.Model.HasRegistrationFor(typeof(IGenericService<>)) + .ShouldBeTrue(); + } +} \ No newline at end of file