party (#15)
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:
2023-08-07 11:34:42 -05:00
parent 81c1c0de0e
commit a67aee24aa
12 changed files with 266 additions and 6 deletions

View 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);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 12e575ff764956245a428c77cced4e48
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View 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
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: da0ac170c269d9342b202cf3000da737
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: