} // Page_Load

        #region Initialization

        protected void Initialize_EnvironmentDropdown()
        {
            System.Collections.Generic.Dictionary <Int64, String> environmentDictionary = application.EnvironmentDictionary(false);

            System.Data.DataTable environmentTable = new DataTable();

            environmentTable.Columns.Add("EnvironmentId");
            environmentTable.Columns.Add("EnvironmentName");

            foreach (Int64 currentEnvironmentId in environmentDictionary.Keys)
            {
                environmentTable.Rows.Add(currentEnvironmentId, environmentDictionary[currentEnvironmentId]);
            } // foreach

            EnvironmentSelection.DataSource = environmentTable;

            EnvironmentSelection.DataTextField = "EnvironmentName";

            EnvironmentSelection.DataValueField = "EnvironmentId";

            EnvironmentSelection.DataBind();

            EnvironmentSelection.SelectedIndex = 0;


            Session[SessionCachePrefix + "EnvironmentSelection.DataSource"] = EnvironmentSelection.DataSource;

            Session[SessionCachePrefix + "EnvironmentSelection.Value"] = EnvironmentSelection.SelectedValue;

            Session[SessionCachePrefix + "EnvironmentSelection.Text"] = EnvironmentSelection.SelectedItem.Text;
        }
Beispiel #2
0
 public TestEnvironment(string host = null, string protocol = null, int port = default, string generationHash = null, string seedAccountPK = null,
                        EnvironmentSelection selection = EnvironmentSelection.DEV)
 {
     Host                 = host;
     Protocol             = protocol;
     Port                 = port;
     GenerationHash       = generationHash;
     SeedAccountPK        = seedAccountPK;
     EnvironmentSelection = selection;
 }
 public BaseTest UseEnvironment(EnvironmentSelection environment)
 {
     _environment = environment;
     return(this);
 }