/
GeekNerd
/
ServerModelingProject
Обзор
Документация
Войти
/
GeekNerd
/
ServerModelingProject
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Assets/Plugins/Zenject/OptionalExtras/UnitTests/Editor/Injection/TestBaseClassPropertyInjection.cs
42 строки
832 B
Gorney-Alex
Init
30 май 2026, 19:05
30 май 2026, 19:05
3cdcc49
Код
Авторство
О чём код?
using NUnit.Framework; using Assert = ModestTree.Assert; namespace Zenject.Tests.Injection { [TestFixture] public class TestBaseClassPropertyInjection : ZenjectUnitTestFixture { class Test0 { } class Test3 { } class Test1 : Test3 { [Inject] protected Test0 val = null; public Test0 GetVal() { return val; } } class Test2 : Test1 { } [Test] public void TestCaseBaseClassPropertyInjection() { Container.Bind<Test0>().AsSingle().NonLazy(); Container.Bind<Test2>().AsSingle().NonLazy(); var test1 = Container.Resolve<Test2>(); Assert.That(test1.GetVal() != null); } } }