public void NonPlayerCharacter_LevelRandomStat_PointsMoreThan100() { //we use reflection to find the method and test it in isolation so we can verify the level points are done properly MethodInfo mi = npc.GetType().GetMethod("LevelRandomStat", BindingFlags.Instance | BindingFlags.NonPublic); npc.LevelPoints = 20; random.Setup(e => e.Next(6)).Returns(0); mi.Invoke(npc, null); Assert.AreEqual(2, npc.StrengthStat); Assert.AreEqual(18, npc.LevelPoints); }