using System.Collections;
using System.Collections.Generic;
using NUnit.Framework;
using UnityEngine;
using UnityEngine.TestTools;
using UnityEngine.SceneManagement;
public class ManagerTests
{
[OneTimeSetUp]
public void OneTimeSetup()
{
SceneManager.LoadScene("Scenes/Demo/Demo_Start", LoadSceneMode.Single); // Selects scene for test
}
[UnityTest]
public IEnumerator gameManagerCheckTest()
{
Assert.IsTrue(GameObject.FindWithTag("Generator"));
return null;
}
[UnityTest]
public IEnumerator mapManagerCheckTest()
{
Assert.IsTrue(GameObject.FindWithTag("Map"));
return null;
}
[UnityTest]
public IEnumerator gromboSpawnedCheckTest()
{
Assert.IsTrue(GameObject.FindWithTag("Player"));
return null;
}
[UnityTest]
public IEnumerator miniMapCheckTest()
{
Assert.IsTrue(GameObject.Find("MiniMap"));
return null;
}
[UnityTest]
public IEnumerator ItemPoolSpawnedCheckTest()
{
Assert.IsTrue(GameObject.Find("GlobalPowerUpTable"));
return null;
}
[UnityTest]
public IEnumerator mapStressTest(){
GameObject MapGen = GameObject.FindWithTag("Map");
MapGeneration Script = MapGen.GetComponent();
int h = 10;
int w = 10;
int oldh = h;
while(h > 0 && w > 0){
Debug.Log("Height = " + h + " Width = " + w);
h *= 2;
w *= 2;
if(h == 1280){
break;
}
Script.setH(h);
Script.setW(w);
Script.gridInitialize();
Script.gridPrint();
}
Debug.Log(Script.retH());
//h = 1280;
Assert.IsTrue(true);
return null;
}
}