public void TestParse()
        {
            NameValueCollection nameValues = new NameValueCollection();
            nameValues.Add(ParameterNames.GroupIds, "1");
            nameValues.Add(ParameterNames.ParentAreaCode, AreaCodes.Sha_EastOfEngland);
            nameValues.Add(ParameterNames.AreaTypeId, "5");

            GroupDataAtDataPointParameters parameters = new GroupDataAtDataPointParameters(nameValues);
            Assert.AreEqual(parameters.GroupId, 1);
        }
 public JsonBuilderGroupDataAtDataPoint(GroupDataAtDataPointParameters parameters)
 {
     _parameters = parameters;
     Parameters = _parameters;
 }
 public JsonBuilderGroupDataAtDataPoint(HttpContextBase context)
     : base(context)
 {
     _parameters = new GroupDataAtDataPointParameters(context.Request.Params);
     Parameters = _parameters;
 }
        public IList<GroupRoot> GetGroupDataAtDataPoint(int profile_id, int group_id, int area_type_id, string parent_area_code)
        {
            try
            {
                NameValueCollection nameValues = new NameValueCollection();
                nameValues.Add(ParameterNames.GroupIds, group_id.ToString());
                nameValues.Add(ParameterNames.ProfileId, profile_id.ToString());
                nameValues.Add(ParameterNames.AreaTypeId, area_type_id.ToString());
                nameValues.Add(ParameterNames.ParentAreaCode, parent_area_code);

                var parameters = new GroupDataAtDataPointParameters(nameValues);
                return new JsonBuilderGroupDataAtDataPoint(parameters).GetGroupRoots();
            }
            catch (Exception ex)
            {
                Log(ex);
                throw;
            }
        }