示例#1
0
        public void GetLicense_StateLevel5_ReturnLevel5()
        {
            WordLeo word  = CreateWordLeo(LicenseLevels.Level_5);
            var     level = word.GetLicense();

            Assert.AreEqual(level, LicenseLevels.Level_5);
        }
示例#2
0
        public void ResetLicense_LicenseLevelEqualsZero_StateProgressEqualsFalse()
        {
            WordLeo word = CreateWordLeo(LicenseLevels.Level_0);

            word.ResetLicense();

            Assert.AreEqual(word.GetLicense(), LicenseLevels.Level_0);
        }
示例#3
0
        public void ResetLicense_LicenseLevelBeggesZero_StateLicenseLevelEqualsZeroAndTimeEqualsNow()
        {
            WordLeo word = CreateWordLeo(LicenseLevels.Level_5);

            word.ResetLicense();
            var snapTime = DateTime.Now;

            Assert.AreEqual(word.GetLicense(), LicenseLevels.Level_0);
            Assert.AreEqual(word.progress.lastRepeat.Second, snapTime.Second);
        }
示例#4
0
        public void ReduceLicense_LicenseLevelEqualsZero_StateNotChange()
        {
            WordLeo       word          = CreateWordLeo(LicenseLevels.Level_0);
            LicenseLevels expextedLevel = LicenseLevels.Level_0;

            word.ReduceLicense();
            var resultLevel = word.GetLicense();

            Assert.AreEqual(resultLevel, expextedLevel);
        }
示例#5
0
        public void ReduceLicense_LicenseLevelEqualsFive_StateLicenseLevelEqualsFour()
        {
            WordLeo       word          = CreateWordLeo(LicenseLevels.Level_5);
            LicenseLevels expextedLevel = LicenseLevels.Level_4;
            var           expextedTime  = DateTime.Now;

            word.ReduceLicense();
            var resultLevel = word.GetLicense();

            Assert.AreEqual(expextedLevel, resultLevel);
            Assert.AreEqual(expextedTime.Second, word.progress.lastRepeat.Second);
        }
示例#6
0
    public void GetLicense()
    {
        var level = _word.GetLicense();

        Assert.IsInstanceOf <LicenseLevels>(level);
    }