A lightweight IOC Container that is powerful enough to do all the things you need it to do.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
789 B

// Author: Simon Gockner
// Created: 2020-09-18
// Copyright(c) 2020 SimonG. All Rights Reserved.
using LightweightIocContainer;
using LightweightIocContainer.Interfaces;
using NUnit.Framework;
namespace Test.LightweightIocContainer
{
[TestFixture]
public class OpenGenericRegistrationTest
{
public interface ITest<T>
{
}
public class Test<T> : ITest<T>
{
}
[Test]
public void TestRegisterOpenGenericType()
{
IIocContainer iocContainer = new IocContainer();
iocContainer.Register(typeof(ITest<>), typeof(Test<>));
ITest<int> test = iocContainer.Resolve<ITest<int>>();
Assert.NotNull(test);
}
}
}