예제 #1
0
파일: API.cs 프로젝트: taoxiease/asegrp
        public API()
        {
            AuthToken = string.Empty;
            IsDesktopApplication = true;
            InstalledCulture = CultureInfo.InstalledUICulture;

            _auth = new auth(this);
            _marketplace = new marketplace(this);
            _admin = new admin(this);
            _photos = new photos(this);
            _friends = new friends(this);
            _users = new users(this);
            _events = new events(this);
            _groups = new groups(this);
            _notifications = new notifications(this);
            _profile = new profile(this);
            _fbml = new fbml(this);
            _feed = new feed(this);
            _fql = new fql(this);
            _liveMessage = new liveMessage(this);
            _batch = new batch(this);
            _pages = new pages(this);
            _application = new application(this);
            _data = new data(this);
            _permissions = new permissions(this);
        }
예제 #2
0
 public void getAllocationTest()
 {
     API parent = _api;
     admin target = new admin(parent);
     admin.IntegrationPointName name = admin.IntegrationPointName.requests_per_day; // TODO: Initialize to an appropriate value
     int actual;
     actual = target.getAllocation(name);
     Assert.IsTrue(actual>0);
 }
예제 #3
0
        public void getMetricsTest()
        {
            API parent = _api;
            admin target = new admin(parent);

            DateTime startDate = DateTime.Now.Subtract(new TimeSpan(10, 0, 0, 0));
            DateTime endDate = DateTime.Now;
            admin.Period period = admin.Period.Day;
            IList<metrics> actual;
            actual = target.getMetrics(startDate, endDate, period);
            Assert.IsTrue(actual.Count>0);
        }