public void TestAddScore() { GameObject testObject = new GameObject(); testObject.AddComponent <StageController>(); StageController sc = testObject.GetComponent <StageController>(); sc.AddScore(20); int expected = 20; int actual = sc.score; Assert.AreEqual(expected, actual, "Testing if a kill is added"); }