Exemple #1
0
        public void gvChartsRowDataBound_WhenCalledWithSocialIdLessThanZero_HideChart()
        {
            // Arrange
            _socialMediaId          = 0;
            _activity               = typeof(SocialActivity).CreateInstance();
            _activity.SocialMediaID = _socialMediaId;
            _image = new ShimImage().Instance;

            // Act
            _privateObject.Invoke(GvChartsRowDataBound, null, new GridViewRowEventArgs(new ShimGridViewRow().Instance));

            // Assert
            _chart.Visible.ShouldBeFalse();
        }
Exemple #2
0
        public void gvChartsRowDataBound_WhenCalledWithSocialIdGreaterThanZero_VerifyChart()
        {
            // Arrange
            _socialMediaId          = 10;
            _activity               = typeof(SocialActivity).CreateInstance();
            _activity.SocialMediaID = _socialMediaId;
            _image = new ShimImage().Instance;

            // Act
            _privateObject.Invoke(GvChartsRowDataBound, null, new GridViewRowEventArgs(new ShimGridViewRow().Instance));

            // Assert
            VerifyChart();
        }