| | 1 | | using System.Collections; |
| | 2 | | using DCL; |
| | 3 | | using UnityEngine.TestTools; |
| | 4 | |
|
| | 5 | | namespace Tests |
| | 6 | | { |
| | 7 | | public class IntegrationTestSuite |
| | 8 | | { |
| 1 | 9 | | protected virtual WorldRuntimeContext CreateRuntimeContext() { return DCL.Tests.WorldRuntimeContextFactory.Creat |
| | 10 | |
|
| 9 | 11 | | protected virtual PlatformContext CreatePlatformContext() { return DCL.Tests.PlatformContextFactory.CreateMocked |
| | 12 | |
|
| | 13 | | protected virtual MessagingContext CreateMessagingContext() |
| | 14 | | { |
| 17 | 15 | | return DCL.Tests.MessagingContextFactory.CreateMocked(); |
| | 16 | | } |
| | 17 | |
|
| | 18 | | [UnitySetUp] |
| | 19 | | protected virtual IEnumerator SetUp() |
| | 20 | | { |
| 17 | 21 | | Environment.SetupWithBuilders( |
| | 22 | | messagingBuilder: CreateMessagingContext, |
| | 23 | | platformBuilder: CreatePlatformContext, |
| | 24 | | worldRuntimeBuilder: CreateRuntimeContext, |
| | 25 | | hudBuilder: HUDContextFactory.CreateDefault |
| | 26 | | ); |
| 17 | 27 | | yield break; |
| | 28 | | } |
| | 29 | |
|
| | 30 | | [UnityTearDown] |
| | 31 | | protected virtual IEnumerator TearDown() |
| | 32 | | { |
| 17 | 33 | | Environment.Dispose(); |
| 17 | 34 | | PoolManager.i?.Cleanup(); |
| 17 | 35 | | yield break; |
| | 36 | | } |
| | 37 | | } |
| | 38 | | } |