Initial Commit
This commit is contained in:
+43
@@ -0,0 +1,43 @@
|
||||
|
||||
using System.Collections;
|
||||
using ModestTree;
|
||||
using UnityEngine.TestTools;
|
||||
|
||||
namespace Zenject.Tests.TestAnimationStateBehaviourInject
|
||||
{
|
||||
public class TestAnimationStateBehaviourInject : ZenjectIntegrationTestFixture
|
||||
{
|
||||
const string ResourcePrefix = "TestAnimationStateBehaviourInject/";
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator Test1()
|
||||
{
|
||||
PreInstall();
|
||||
var prefab = FixtureUtil.GetPrefab(ResourcePrefix + "Foo");
|
||||
|
||||
StateBehaviour1.OnStateEnterCalls = 0;
|
||||
|
||||
Container.InstantiatePrefab(prefab);
|
||||
Container.BindInterfacesAndSelfTo<Foo>().AsSingle();
|
||||
PostInstall();
|
||||
|
||||
yield return null;
|
||||
|
||||
Assert.IsEqual(StateBehaviour1.OnStateEnterCalls, 1);
|
||||
}
|
||||
|
||||
public class Foo : IInitializable
|
||||
{
|
||||
public bool HasInitialized
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
HasInitialized = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f80ffddc2b920e54f85483d37863d1ba
|
||||
timeCreated: 1527866041
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user