Update Project
This commit is contained in:
+34
@@ -0,0 +1,34 @@
|
||||
using NUnit.Framework;
|
||||
using Assert = ModestTree.Assert;
|
||||
|
||||
namespace Zenject.Tests.Injection
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestDuplicateInjection : ZenjectUnitTestFixture
|
||||
{
|
||||
class Test0
|
||||
{
|
||||
}
|
||||
|
||||
class Test1
|
||||
{
|
||||
public Test1(Test0 test1)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestCaseDuplicateInjection()
|
||||
{
|
||||
Container.Bind<Test0>().AsCached();
|
||||
Container.Bind<Test0>().AsCached();
|
||||
|
||||
Container.Bind<Test1>().AsSingle();
|
||||
|
||||
Assert.Throws(
|
||||
delegate { Container.Resolve<Test1>(); });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user