Ejemplo n.º 1
0
        public void TestCStorCommandText()
        {
            ParamsObject _input   = null;
            bool         _created = true;
            Exception    _ex      = null;

            try
            {
                _input = DynamicParamsCreator
                         .Create()
                         .AddSwitch <string>("FirstName")
                         .FinishBuilding(new StringBuilder("/?"));
            }
            catch (Exception ex)
            {
                _ex      = ex;
                _created = false;
            }
            Assert.IsTrue(_created, $"Failed to parse switches. Ex: {handleEx(_ex)}");
            string _helpText = _input.GetHelpIfNeeded();

            Assert.IsTrue(!string.IsNullOrWhiteSpace(_helpText), "Help not retrieved");
        }