public IEnumerable<InputFileParameter> LoadInput()
 {
     var rows = 50;
     var fileName = UtilHelper.generateJsonFile(rows);
     IFormatHelper formatter = new JsonFormatHelper();
     var records = formatter.LoadFile<InputFileParameter>(fileName);
     return records;
 }
        public IEnumerable <InputFileParameter> LoadInput()
        {
            var           rows      = 50;
            var           fileName  = UtilHelper.generateJsonFile(rows);
            IFormatHelper formatter = new JsonFormatHelper();
            var           records   = formatter.LoadFile <InputFileParameter>(fileName);

            return(records);
        }
        public void UT_GetAlias()
        {
            try
            {
                IFormatHelper formatter = new JsonFormatHelper();
                Assert.IsNotNull(formatter.getAlias());

                Assert.IsTrue(formatter.getAlias().ToLowerInvariant().CompareTo("json") == 0);
            }
            catch
            {
                Assert.IsTrue(false);
            }
        }
        public void UT_GetAlias()
        {
            try
            {
                IFormatHelper formatter = new JsonFormatHelper();
                Assert.IsNotNull(formatter.getAlias());

                Assert.IsTrue(formatter.getAlias().ToLowerInvariant().CompareTo("json")==0);
            }
            catch
            {
                Assert.IsTrue(false);
            }
        }
 private void RenderResultText()
 {
     if (this.KeyValue.RedisType == RedisType.String)
     {
         if (ViewTypeSelect == 1)
         {
             this.ResultViewText = KeyValue.Value;
         }
         else if (ViewTypeSelect == 2)
         {
             this.ResultViewText = JsonFormatHelper.Format(KeyValue.Value);
         }
         else
         {
             MessageBox.Show("Unsoppert show type ", "Title");
         }
     }
 }
        public void UT_WriteOutput()
        {
            try
            {
                var records = LoadInput();
                Assert.IsNotNull(records);

                var           outputFile = Path.GetTempFileName();
                IFormatHelper formatter  = new JsonFormatHelper();
                formatter.WriteOutputFile <InputFileParameter>(records, outputFile);

                var records2 = formatter.LoadFile <InputFileParameter>(outputFile);
                Assert.IsTrue(records2.Count() == 50);
            }
            catch
            {
                Assert.IsTrue(false);
            }
        }
        public void UT_WriteOutput()
        {
            try
            {
                var records = LoadInput();
                Assert.IsNotNull(records);

                var outputFile = Path.GetTempFileName();
                IFormatHelper formatter = new JsonFormatHelper();
                formatter.WriteOutputFile<InputFileParameter>(records, outputFile);

                var records2 = formatter.LoadFile<InputFileParameter>(outputFile);
                Assert.IsTrue(records2.Count() == 50);
            }
            catch
            {
                Assert.IsTrue(false);
            }
        }