public void LevelUpBadgeTest()
 {
     var user = new DefaultUser("Language");
     var experience = new LanguageExperience("Language", ".\\Contents\\Level\\lvlUpTest.prop", "cs");
     experience.AddExperience(10);
     user.ExperiencePoints.Add("cs", experience);            
     var badge = new LanguageFirstCSharpLevel();
     badge.Compute(user);
     Assert.IsTrue(badge.Gained);
 }
        public void LevelUpBadgeTest()
        {
            var user       = new DefaultUser("Language");
            var experience = new LanguageExperience("Language", ".\\Contents\\Level\\lvlUpTest.prop", "cs");

            experience.AddExperience(10);
            user.ExperiencePoints.Add("cs", experience);
            var badge = new LanguageFirstCSharpLevel();

            badge.Compute(user);
            Assert.IsTrue(badge.Gained);
        }
        public void lvlUpTest()
        {
            var builder = new LanguageBuilder();
            var languageModel = new LanguageModel("cs", "file1.cs");
            var lang = new SimpleLanguage(languageModel);
            languageModel = new LanguageModel("cs", "file.cs");
            lang.Add(languageModel);
            languageModel = new LanguageModel("cs", "file23.cs");
            lang.Add(languageModel);
            builder.LanguageAttributes.Add("cs", lang);

            var expLang = new LanguageExperience("Teste", @".\Contents\Level\lvlUpTest.prop", "Language Points");
            expLang.AddModel(builder);

            Assert.AreEqual(2, expLang.Level);
            Assert.AreEqual(3, expLang.ExperiencePoints);
            Assert.AreEqual("Teste", expLang.Name);
        }
        public void lvlUpTest()
        {
            var builder       = new LanguageBuilder();
            var languageModel = new LanguageModel("cs", "file1.cs");
            var lang          = new SimpleLanguage(languageModel);

            languageModel = new LanguageModel("cs", "file.cs");
            lang.Add(languageModel);
            languageModel = new LanguageModel("cs", "file23.cs");
            lang.Add(languageModel);
            builder.LanguageAttributes.Add("cs", lang);

            var expLang = new LanguageExperience("Teste", @".\Contents\Level\lvlUpTest.prop", "Language Points");

            expLang.AddModel(builder);

            Assert.AreEqual(2, expLang.Level);
            Assert.AreEqual(3, expLang.ExperiencePoints);
            Assert.AreEqual("Teste", expLang.Name);
        }
예제 #5
0
 private static SelectListItem GetSLI(LanguageExperience arg)
 {
     return(GetSelectListItem(arg));
 }