using System.Collections; using System.Collections.Generic; using NUnit.Framework; using UnityEngine; using UnityEngine.TestTools; public class AttributeTest { [Test] [TestCase(1000000, 0, 0, 0, 0, ExpectedResult = 1000000)] [TestCase(1000000, 1, 0, 0, 0, ExpectedResult = 1000001)] [TestCase(1000000, 0, 2, 0, 0, ExpectedResult = 1000002)] [TestCase(1000000, 0, 0, 10000, 0, ExpectedResult = 2000000)] [TestCase(1000000, 0, 0, 0, 3, ExpectedResult = 1000003)] [TestCase(0, 1000000, 1000000, 5000, 1000, ExpectedResult = 3001000)] [TestCase(1000000, 0, 0, -10000, 0, ExpectedResult = 0)] [TestCase(1000000, 0, 0, -20000, 0, ExpectedResult = 0)] [TestCase(1000000, 0, 0, -20000, 50, ExpectedResult = 0)] public long Calc(long startStat, long levelUp, long baseBonus, long permyriadBonus, long flatBonus) { var attr = new Attribute(startStat); attr.LevelUp(levelUp); return attr.Calc(baseBonus, permyriadBonus, flatBonus); } }