public void getCookie() { GameObject gb = new GameObject("CookieText"); UnityEngine.UI.Text st = gb.AddComponent<UnityEngine.UI.Text>(); st.text = "Cookie:"; PlayerInventorySingle pi = new PlayerInventorySingle(); pi.ResetCookie(); pi.IncreaseCookieCount(); //check increase initially willl get 1 cookies Assert.That(pi.GetCookieCount() == 1); pi.IncreaseCookieCount(); //check increase again will +1 and not reset Assert.That(pi.GetCookieCount() == 2); }
public void getKey() { PlayerInventorySingle pi = new PlayerInventorySingle(); pi.GotKey(1); Assert.That(pi.HasKey(1));//check after getting key inventory updates }
public void checkNoKey() { PlayerInventorySingle pi = new PlayerInventorySingle(); Assert.That(pi.HasKey(2) == false);//check dont have key will say inventory dont have }