示例#1
0
        public async Task Returns_400_When_GetBanners_Called()
        {
            string id = "";

            var response = await _bannerController.GetBanners(id);

            Assert.IsTrue(response is StatusCodeResult);
            var statusCode = (StatusCodeResult)response;

            statusCode.StatusCode.Should().Be((int)HttpStatusCode.BadRequest);
        }
示例#2
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// BindData gets the banners from the Database and binds them to the DataGrid
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [cnurse]	9/17/2004	Updated to reflect design changes for Help, 508 support
        ///                       and localisation
        /// </history>
        /// -----------------------------------------------------------------------------
        private void BindData()
        {
            var objBanners = new BannerController();

            //Localize the Grid
            Localization.LocalizeDataGrid(ref grdBanners, LocalResourceFile);

            grdBanners.DataSource = objBanners.GetBanners(VendorID);
            grdBanners.DataBind();

            cmdAdd.NavigateUrl = FormatURL("BannerId", "-1");
        }