Ejemplo n.º 1
0
        public IEnumerator 여러버프_동작테스트()
        {
            // Arrange (데이터 정렬)
            string strCharacterName       = nameof(여러버프_동작테스트);
            float  fDurationSec           = 0.5f;
            float  fBuffPower_AttackSpeed = 0.1f;
            float  fBuffPower_MoveSpeed   = 0.5f;

            Character_BuffTester pCharacterTester = new Character_BuffTester(strCharacterName);
            TestBuffContainer    pBuff            = new TestBuffContainer(EBuffName.디버프_둔화, fDurationSec, new TestBuffAttribute(EBuffAttribute.공격속도_감소, fBuffPower_AttackSpeed), new TestBuffAttribute(EBuffAttribute.이동속도_감소, fBuffPower_MoveSpeed));



            // Act (기능 실행)
            Assert.AreEqual(pCharacterTester.strCharacterName, strCharacterName);
            Assert.AreEqual(pCharacterTester.fDamage, Character_BuffTester.const_fDamage_Init);
            Assert.AreEqual(pCharacterTester.fAttackSpeed * fBuffPower_AttackSpeed, Character_BuffTester.const_fAttackSpeed_Init * fBuffPower_AttackSpeed);
            Assert.AreEqual(pCharacterTester.fMoveSpeed * fBuffPower_MoveSpeed, Character_BuffTester.const_fMoveSpeed_Init * fBuffPower_MoveSpeed);



            // Assert (맞는지 체크)
            Assert.AreEqual(pCharacterTester.strCharacterName, strCharacterName);
            Assert.AreEqual(pCharacterTester.fDamage, Character_BuffTester.const_fDamage_Init);
            Assert.AreEqual(pCharacterTester.fAttackSpeed, Character_BuffTester.const_fAttackSpeed_Init);
            Assert.AreEqual(pCharacterTester.fMoveSpeed, Character_BuffTester.const_fMoveSpeed_Init);

            yield break;
        }
Ejemplo n.º 2
0
        public IEnumerator 단일버프_동작테스트()
        {
            // Arrange (데이터 정렬)
            string strCharacterName = nameof(여러버프_동작테스트);
            float  fDurationSec     = 1f;
            float  fBuffPower       = 2f;

            Character_BuffTester pCharacterTester = new Character_BuffTester(strCharacterName);
            TestBuffContainer    pBuff            = new TestBuffContainer(EBuffName.버프_공격력증가, fDurationSec, arrBuffAttribute: new TestBuffAttribute(EBuffAttribute.공격력증가, fBuffPower));



            // Act (기능 실행)
            Assert.AreEqual(pCharacterTester.strCharacterName, strCharacterName);
            Assert.AreEqual(pCharacterTester.fDamage * fBuffPower, Character_BuffTester.const_fDamage_Init * fBuffPower);
            Assert.AreEqual(pCharacterTester.fAttackSpeed, Character_BuffTester.const_fAttackSpeed_Init);
            Assert.AreEqual(pCharacterTester.fMoveSpeed, Character_BuffTester.const_fMoveSpeed_Init);



            // Assert (맞는지 체크)
            Assert.AreEqual(pCharacterTester.strCharacterName, strCharacterName);
            Assert.AreEqual(pCharacterTester.fDamage, Character_BuffTester.const_fDamage_Init);
            Assert.AreEqual(pCharacterTester.fAttackSpeed, Character_BuffTester.const_fAttackSpeed_Init);
            Assert.AreEqual(pCharacterTester.fMoveSpeed, Character_BuffTester.const_fMoveSpeed_Init);


            yield break;
        }