public void PreviewProfileController_Delete_With_ValidID() { PrepareData(); new PreviewProfileController().Delete(0, 1); IList<IPreviewProfile> list = new PreviewProfileController().GetProfilesByPortal(0); Assert.AreEqual(2, list.Count); }
private void BindProfiles() { var profiles = new PreviewProfileController().GetProfilesByPortal(ModuleContext.PortalId); ddlProfileList.Items.Clear(); var selectedProfile = -1; if (Request.QueryString["profile"] != null) { selectedProfile = Convert.ToInt32(Request.QueryString["profile"]); } foreach (var previewProfile in profiles) { var value = string.Format("width : \"{0}\", height : \"{1}\", userAgent: \"{2}\"", previewProfile.Width, previewProfile.Height, UrlUtils.EncryptParameter(previewProfile.UserAgent)); var listItem = new ListItem(previewProfile.Name, value); if (selectedProfile == previewProfile.Id) { listItem.Selected = true; } ddlProfileList.AddItem(listItem.Text, listItem.Value); } }
public void PreviewProfileController_GetProfilesByPortal_With_Valid_PortalID() { PrepareData(); IList<IPreviewProfile> list = new PreviewProfileController().GetProfilesByPortal(0); Assert.AreEqual(3, list.Count); }