party (#15)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Resolves #6. Updates #3. Co-authored-by: Branden J Brown <zephyrtronium@gmail.com> Reviewed-on: #15 Reviewed-by: madxmike <madxmike@noreply.localhost>
This commit is contained in:
23
Assets/TestsPlaymode/HeroPartyTest.cs
Normal file
23
Assets/TestsPlaymode/HeroPartyTest.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
|
||||
public class HeroPartyTest
|
||||
{
|
||||
[UnityTest]
|
||||
public IEnumerator HeroPartyGetsAllTheHeroes()
|
||||
{
|
||||
var prefab = AssetDatabase.LoadAssetAtPath<GameObject>("Assets/Prefabs/Hero.prefab");
|
||||
Assert.IsNotNull(prefab);
|
||||
var instance = Object.Instantiate(prefab);
|
||||
var hero = instance.GetComponent<HeroUnit>();
|
||||
yield return null;
|
||||
Assert.AreEqual(1, hero.party.Count);
|
||||
Object.Destroy(instance);
|
||||
yield return null;
|
||||
Assert.IsEmpty(hero.party.UnitList);
|
||||
}
|
||||
}
|
11
Assets/TestsPlaymode/HeroPartyTest.cs.meta
generated
Normal file
11
Assets/TestsPlaymode/HeroPartyTest.cs.meta
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 12e575ff764956245a428c77cced4e48
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
22
Assets/TestsPlaymode/TestsPlaymode.asmdef
Normal file
22
Assets/TestsPlaymode/TestsPlaymode.asmdef
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "TestsPlaymode",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"UnityEngine.TestRunner",
|
||||
"UnityEditor.TestRunner",
|
||||
"IdleSurvivors"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": true,
|
||||
"precompiledReferences": [
|
||||
"nunit.framework.dll"
|
||||
],
|
||||
"autoReferenced": false,
|
||||
"defineConstraints": [
|
||||
"UNITY_INCLUDE_TESTS"
|
||||
],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
7
Assets/TestsPlaymode/TestsPlaymode.asmdef.meta
generated
Normal file
7
Assets/TestsPlaymode/TestsPlaymode.asmdef.meta
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: da0ac170c269d9342b202cf3000da737
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user