예제 #1
0
        public void StatsGetTotalViewsBasicTest()
        {
            StatViews views = AuthInstance.StatsGetTotalViews();

            Assert.IsNotNull(views, "StatViews should not be null.");
            Assert.AreNotEqual(0, views.TotalViews, "TotalViews should be greater than zero.");
            Assert.AreNotEqual(0, views.PhotostreamViews, "PhotostreamViews should be greater than zero.");
            Assert.AreNotEqual(0, views.PhotoViews, "PhotoViews should be greater than zero.");
        }
예제 #2
0
        public void StatsGetTotalViewsBasicTest()
        {
            Flickr f = TestData.GetAuthInstance();

            StatViews views = f.StatsGetTotalViews();

            Assert.IsNotNull(views, "StatViews should not be null.");
            Assert.AreNotEqual(0, views.TotalViews, "TotalViews should be greater than zero.");
            Assert.AreNotEqual(0, views.PhotostreamViews, "PhotostreamViews should be greater than zero.");
            Assert.AreNotEqual(0, views.PhotoViews, "PhotoViews should be greater than zero.");

            // Seems to be returning zero for some reason.
            //Assert.AreNotEqual(0, views.PhotosetViews, "PhotosetViews should be greater than zero.");

            // I have no collection views, so this almost always returns zero, which is correct.
            //Assert.AreNotEqual(0, views.CollectionViews, "CollectionViews should be greater than zero.");
        }
예제 #3
0
        private StatViews CreateStatViews(View view)
        {
            StatViews views = new StatViews();

            views.Root        = view;
            views.PlayerName  = view.FindViewById <TextView>(Resource.Id.playerName);
            views.GoalImage   = view.FindViewById <View>(Resource.Id.goalStat).FindViewById <ImageView>(Resource.Id.statIcon);
            views.GoalText    = view.FindViewById <View>(Resource.Id.goalStat).FindViewById <TextView>(Resource.Id.statNumber);
            views.AssistImage = view.FindViewById <View>(Resource.Id.assistStat).FindViewById <ImageView>(Resource.Id.statIcon);
            views.AssistText  = view.FindViewById <View>(Resource.Id.assistStat).FindViewById <TextView>(Resource.Id.statNumber);
            views.P2Image     = view.FindViewById <View>(Resource.Id.P2Stat).FindViewById <ImageView>(Resource.Id.statIcon);
            views.P2Text      = view.FindViewById <View>(Resource.Id.P2Stat).FindViewById <TextView>(Resource.Id.statNumber);
            views.P5Image     = view.FindViewById <View>(Resource.Id.P5Stat).FindViewById <ImageView>(Resource.Id.statIcon);
            views.P5Text      = view.FindViewById <View>(Resource.Id.P5Stat).FindViewById <TextView>(Resource.Id.statNumber);
            views.P10Image    = view.FindViewById <View>(Resource.Id.P10Stat).FindViewById <ImageView>(Resource.Id.statIcon);
            views.P10Text     = view.FindViewById <View>(Resource.Id.P10Stat).FindViewById <TextView>(Resource.Id.statNumber);
            views.PVImage     = view.FindViewById <View>(Resource.Id.PVStat).FindViewById <ImageView>(Resource.Id.statIcon);
            views.PVText      = view.FindViewById <View>(Resource.Id.PVStat).FindViewById <TextView>(Resource.Id.statNumber);

            return(views);
        }