/
GeekNerd
/
ServerModelingProject
Обзор
Документация
Войти
/
GeekNerd
/
ServerModelingProject
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Assets/Plugins/Zenject/OptionalExtras/TestFramework/ZenjectUnitTestFixture.cs
31 строка
884 B
Gorney-Alex
Init
30 май 2026, 19:05
30 май 2026, 19:05
3cdcc49
Код
Авторство
О чём код?
using NUnit.Framework; namespace Zenject { // Inherit from this and mark you class with [TestFixture] attribute to do some unit tests // For anything more complicated than this, such as tests involving interaction between // several classes, or if you want to use interfaces such as IInitializable or IDisposable, // then I recommend using ZenjectIntegrationTestFixture instead // See documentation for details public abstract class ZenjectUnitTestFixture { DiContainer _container; protected DiContainer Container { get { return _container; } } [SetUp] public virtual void Setup() { _container = new DiContainer(StaticContext.Container); } [TearDown] public virtual void Teardown() { StaticContext.Clear(); } } }