Ejemplo n.º 1
0
        public IEnumerator TestRateGeneration()
        {
            SceneManager.LoadScene("MainScene");
            yield return(null);

            BeehiveManager bm = MonoBehaviour.FindObjectOfType <BeehiveManager>();

            Assert.IsNotNull(bm);

            bm.selectedCell = 0;
            bm.ClickOnCell(Vector3Int.zero);
            bm.ClickOnCell(Vector3Int.right);
            bm.ClickOnCell(Vector3Int.left);

            Assert.AreEqual(3, bm.GetTileAmount(bm.honeydrop));
        }
Ejemplo n.º 2
0
        public IEnumerator TestRoyalJellyGeneration()
        {
            SceneManager.LoadScene("MainScene");
            yield return(null);

            BeehiveManager bm = MonoBehaviour.FindObjectOfType <BeehiveManager>();

            Assert.IsNotNull(bm);

            bm.selectedCell = 0;
            bm.overlayTilemap.FloodFill(Vector3Int.zero, bm.jelly);
            bm.ClickOnCell(Vector3Int.zero);
            Debug.Log("Jelly Tiles" + bm.GetTileAmount(bm.honeydrop));
            bm.beehive.setHoney(100000);
            bm.beehive.setPollen(300000);
            yield return(new WaitForSeconds(0.5f));

            Debug.Log("Current Jelly after 0.5 seconds: " + bm.beehive.currentJelly.ToString());
            Assert.Greater(bm.beehive.currentJelly, 0, "Not enough royal jelly.");
        }