public _DataItem(string uri, string tag, string type, object m, TeardownOption option)
        {
            Uri = uri;
            switch (option)
            {
            case TeardownOption.All:
                TearDownSql   = true;
                TearDownGraph = true;
                break;

            case TeardownOption.Graph:
                TearDownSql   = false;
                TearDownGraph = true;
                TearDownInUI  = false;
                break;

            case TeardownOption.Sql:
                TearDownSql   = true;
                TearDownGraph = false;
                TearDownInUI  = false;
                break;

            case TeardownOption.UI:
                TearDownSql   = false;
                TearDownGraph = false;
                TearDownInUI  = true;
                break;

            case TeardownOption.None:
                TearDownSql   = false;
                TearDownGraph = false;
                TearDownInUI  = false;
                break;
            }
            model    = m;
            TypeName = type;
            Tag      = tag;
        }
示例#2
0
        public static void StoreUri(this ScenarioContext context, string newUri, string tag, string type, Object model, TeardownOption teardownOption)
        {
            var dataItems = GetDataItems(context);

            dataItems.Add(new _DataItem(newUri, tag, type, model, teardownOption));
            context[constants.dataItems] = dataItems;
        }