public void CreateOptionValidAlias(OptionAliasData.ValidOptionAlias validType)
        {
            var optionHandler = new OptionManager();
            var requestDic    = new Dictionary <string, object>(OptionAliasData.GetOptionRequestDictionary($"my option {validType.ToString()}"))
            {
                ["parent_id"] = 0,
                ["children"]  = new List <Dictionary <string, object> >
                {
                    OptionAliasData.GetOptionRequestDictionary($"my option {validType.ToString()} child")
                },
            };

            OptionAliasData.ValidAliasMapper[validType](requestDic, string.Empty);
            var result = optionHandler.CreateOption(requestDic);

            PrAssert.That(result, PrIs.SuccessfulResponse(), "Cannot create option");

            var data = optionHandler.SearchOption(result.Result.Single().Id);

            OptionCleaner.DeleteMany(new List <int>()
            {
                result.Result.Single().Children.Single().Id, result.Result.Single().Id
            });
            if (validType != OptionAliasData.ValidOptionAlias.Empty)
            {
                PrAssert.That(data.Result.Single().Alias, PrIs.EqualTo(requestDic["alias"]));
            }
            else
            {
                PrAssert.That(data.Result.Single().Alias, PrIs.Not.Null.And.Not.Empty);
            }
        }
        public void UpdateOptionValidAlias(OptionAliasData.ValidOptionAlias validType)
        {
            var optionHandler = new OptionManager();
            var updateRequest = new Dictionary <string, object>()
            {
                ["children"] = new List <Dictionary <string, object> >
                {
                    OptionAliasData.GetOptionRequestDictionary($"my option {validType.ToString()} child", OptionCreater.Data.Children.Single().Id)
                },
            };

            OptionAliasData.ValidAliasMapper[validType](updateRequest, string.Empty);
            var updateResult = optionHandler.UpdateOption(OptionCreater.Data.Id, updateRequest);

            PrAssert.That(updateResult, PrIs.ErrorResponse().And.HttpCode(HttpStatusCode.BadRequest).And.ErrorCode((int)ResultCode.InvalidParameter), "Update Option Successfully");
        }