public void CoinLoaderLoadsNumberOfCoins() { GameObject loaderObject = new GameObject(); CoinLoader loader = loaderObject.AddComponent <CoinLoader>(); Text text = loaderObject.AddComponent <Text>(); loader.coins = -1; loader.Start(); Assert.AreNotEqual(-1, loader.coins); }
public void BuyReducesNumberOfCoins() { GameObject loaderObject = new GameObject(); CoinLoader loader = loaderObject.AddComponent <CoinLoader>(); Text text = loaderObject.AddComponent <Text>(); loader.coins = 2; loader.Buy(1); Assert.Greater(2, loader.coins); }
public void BuyChangesText() { GameObject loaderObject = new GameObject(); CoinLoader loader = loaderObject.AddComponent <CoinLoader>(); Text text = loaderObject.AddComponent <Text>(); text.text = null; loader.Buy(1); Assert.IsNotNull(text.text); }
public void CoinLoaderSetsText() { GameObject loaderObject = new GameObject(); CoinLoader loader = loaderObject.AddComponent <CoinLoader>(); Text text = loaderObject.AddComponent <Text>(); text.text = null; loader.Start(); Assert.IsNotNull(text.text); }