Esempio n. 1
0
        public override void DoCells(Parse parse)
        {
            if (restFixture == null)
            {
                restFixture        = new CommonRestFixture <Parse>(this.Symbols);
                restFixture.Config = Config.getConfig(ConfigNameFromArgs);
                string url = BaseUrlFromArgs;
                if (url != null)
                {
                    restFixture.BaseUrl = new Url(HtmlTools.fromSimpleTag(url));
                }
                restFixture.initialize(Runner.FIT);
                ((FitFormatter)restFixture.Formatter).ActionFixtureDelegate = this;
            }
            IRowWrapper <Parse> currentRow = new FitRow(parse);

            try
            {
                restFixture.Formatter.DisplayActual = restFixture.displayActualOnRight;
                restFixture.processRow(currentRow);
            }
            catch (Exception exception)
            {
                // TODO: Sort out CellWrapper vs CellWrapper<Parse>.
                ICellWrapper <Parse> firstCell = currentRow.getCell(0);
                LOG.Error(exception, "Exception when processing row {0}", firstCell.text());
                ICellFormatter <Parse> cellFormatter = restFixture.Formatter;
                cellFormatter.exception(firstCell, exception);
            }
        }
Esempio n. 2
0
 /// <summary>
 /// VisibleForTesting </summary>
 /// <param name="partsFactory">
 ///            the factory of parts necessary to create the rest fixture </param>
 /// <param name="hostName"> </param>
 /// <param name="configName"> </param>
 internal RestFixture(PartsFactory partsFactory, string hostName, string configName)
 {
     _restFixture = new CommonRestFixture <string>(partsFactory, hostName, configName);
 }
Esempio n. 3
0
 /// <summary>
 /// Constructor for Slim runner.
 /// </summary>
 /// <param name="hostName">
 ///            the cells following up the first cell in the first row. </param>
 /// <param name="configName">
 ///            the value of cell number 3 in first row of the fixture table. </param>
 public RestFixture(string hostName, string configName)
 {
     _restFixture = new CommonRestFixture <string>(hostName, configName);
 }