public void TestParsingFull()
        {
            BarCodeSettings inputSettings = SettingsUtils.CreateTestSettings();

            NameValueCollection querystring = new NameValueCollection();

            querystring.Add(QueryStringSerializer.TYPE_KEY, inputSettings.Type.ToString());
            querystring.Add(QueryStringSerializer.DATA_KEY, inputSettings.Data);
            querystring.Add(QueryStringSerializer.UNIT_KEY, inputSettings.Unit.ToString());
            querystring.Add(QueryStringSerializer.DPI_KEY, inputSettings.Dpi.ToString());
            querystring.Add(QueryStringSerializer.BACKCOLOR_KEY, inputSettings.BackColor.ToArgb().ToString());
            querystring.Add(QueryStringSerializer.BARCOLOR_KEY, inputSettings.BarColor.ToArgb().ToString());
            querystring.Add(QueryStringSerializer.BARHEIGHT_KEY, inputSettings.BarHeight.ToString());
            querystring.Add(QueryStringSerializer.FONTCOLOR_KEY, inputSettings.FontColor.ToArgb().ToString());
            querystring.Add(QueryStringSerializer.GUARDEXTRAHEIGHT_KEY, inputSettings.GuardExtraHeight.ToString());
            querystring.Add(QueryStringSerializer.MODULEWIDTH_KEY, inputSettings.ModuleWidth.ToString());
            querystring.Add(QueryStringSerializer.NARROWWIDTH_KEY, inputSettings.NarrowWidth.ToString());
            querystring.Add(QueryStringSerializer.WIDEWIDTH_KEY, inputSettings.WideWidth.ToString());
            querystring.Add(QueryStringSerializer.OFFSETHEIGHT_KEY, inputSettings.OffsetHeight.ToString());
            querystring.Add(QueryStringSerializer.OFFSETWIDTH_KEY, inputSettings.OffsetWidth.ToString());
            querystring.Add(QueryStringSerializer.FONT_KEY, (string)new FontConverter().ConvertTo(inputSettings.Font, typeof(string)));
            querystring.Add(QueryStringSerializer.TEXTPOSITION_KEY, inputSettings.TextPosition.ToString());
            querystring.Add(QueryStringSerializer.USECHECKSUM_KEY, inputSettings.UseChecksum.ToString());

            IBarCodeSettings settings = QueryStringSerializer.ParseQueryString(querystring);

            SettingsUtils.AssertSettingsEqual(inputSettings, settings);
        }
        public void TestParseGenerated()
        {
            BarCodeSettings settings = SettingsUtils.CreateTestSettings();

            string queryString = QueryStringSerializer.ToQueryString(settings);

            // re-parse querystring
            NameValueCollection queryStringCollection = MakeCollection(queryString);
            IBarCodeSettings    parsedSettings        = QueryStringSerializer.ParseQueryString(queryStringCollection);

            // compare outcome
            SettingsUtils.AssertSettingsEqual(settings, parsedSettings);
        }