Exemplo n.º 1
0
        public void UpdateRatings()
        {
            var tc = new RankInAll.Core.OnlineContest.Topcoder.TopcoderProvider();

            List<string> list = storage.GetCFUsers();
            foreach (var userName in list)
            {
                var user = tc.GetProfile(userName);
                //把ur.Rating更新到数据库里面
                if (user != null)
                    storage.UpdateTopcoder(user);
            }
        }
Exemplo n.º 2
0
 public void GetProfileTest()
 {
     TopcoderProvider target = new TopcoderProvider(); // TODO: 初始化为适当的值
     string user_id = "lmm333"; // TODO: 初始化为适当的值
     User expected = new User()
     {
         Color = "coderTextGray",
         MostRecentEvent = "SRM 532-02.09.12",
         Rating = 864,
         Timesplayed = 14,
         UserName = "******",
         Volatility = 180
     };
     User actual;
     actual = target.GetProfile(user_id);
     //Assert.AreEqual(expected, actual);
     AssertUser(expected, actual);
 }