public void Compute(IUser user)
 {
     var exp = new SVNExperience("current", ".\\Experience\\UserLevel.prop", "Alias");
     exp.AddModel((SVNModel)user.ExtensionPoint["SVNExtension"]);
     if (exp.Level > 30)
     {
         Gained = true;
     }
 }
Ejemplo n.º 2
0
        public void Compute(IUser user)
        {
            var exp = new SVNExperience("current", ".\\Experience\\UserLevel.prop", "Alias");

            exp.AddModel((SVNModel)user.ExtensionPoint["SVNExtension"]);
            if (exp.Level > 20)
            {
                Gained = true;
            }
        }
 public void LevelUserUpTest()
 {
     string fileLevel = ".\\Experience\\UserLevel.prop";
     var model = new SVNModel();
     model.AddAdd(10);
     model.AddModified(5);                        
     var svnExp = new SVNExperience("TestSVNModel", fileLevel, "SVN");
     var exp = new Experience("TestUser", fileLevel, "SVN");
     svnExp.AddModel(model);
     exp.AddPluginExperience(svnExp);            
     Assert.AreEqual(2, exp.Level);
     Assert.AreEqual(15, exp.ExperiencePoints);
 }
Ejemplo n.º 4
0
        public void LevelSvnUpTest()
        {
            string fileLevel = ".\\Experience\\UserLevel.prop";
            var    model     = new SVNModel();

            model.AddAdd(1000);
            model.AddModified(10000);
            model.AddDeleted(600);
            var svnExp = new SVNExperience("TestUser", fileLevel, "SVN");

            svnExp.AddModel(model);
            Assert.AreEqual(17, svnExp.Level);
            Assert.AreEqual(11600, svnExp.ExperiencePoints);
            Assert.AreEqual("TestUser", svnExp.Name);
        }
Ejemplo n.º 5
0
        public void LevelUserUpTest()
        {
            string fileLevel = ".\\Experience\\UserLevel.prop";
            var    model     = new SVNModel();

            model.AddAdd(10);
            model.AddModified(5);
            var svnExp = new SVNExperience("TestSVNModel", fileLevel, "SVN");
            var exp    = new Experience("TestUser", fileLevel, "SVN");

            svnExp.AddModel(model);
            exp.AddPluginExperience(svnExp);
            Assert.AreEqual(2, exp.Level);
            Assert.AreEqual(15, exp.ExperiencePoints);
        }
 public void LevelSvnUpTest()
 {
     string fileLevel = ".\\Experience\\UserLevel.prop";
     var model = new SVNModel();
     model.AddAdd(1000);
     model.AddModified(10000);
     model.AddDeleted(600);
     var svnExp = new SVNExperience("TestUser", fileLevel, "SVN");
     svnExp.AddModel(model);
     Assert.AreEqual(17, svnExp.Level);
     Assert.AreEqual(11600, svnExp.ExperiencePoints);
     Assert.AreEqual("TestUser", svnExp.Name);
 }