コード例 #1
0
        public static IReadOnlyCollection <Period> GetHistoryFromFile()
        {
            string          filePath       = @"D:\\InterviewTest\InterviewTest.DriverData\DataFiles\HistoryData.json";
            IDataFileReader fileDataReader = new FileDataReader();
            string          historyData    = fileDataReader.ReadFileData(filePath);
            IDataParser     jsondataParser = new JsonDataParser();

            return(jsondataParser.ParseData <IReadOnlyCollection <Period> >(historyData));
        }
コード例 #2
0
        /// <summary>
        /// Function to add multiple product lines.
        /// </summary>
        /// <param name="productLineData"></param>
        public void AddMultipleProducts(List <DataDictionary> productLineData)
        {
            foreach (DataDictionary data in productLineData)
            {
                ProductLineData productLine = JsonDataParser <ProductLineData> .ParseData(data.Value);

                Thread.Sleep(4000);
                ClickOnAddProduct().EnterWidth(productLine.Width).EnterHeight(productLine.Height).EnterRoomLocation(productLine.NDBRoomLocation)
                .SelectProduct(productLine.ProductType).SelectProductOptions(productLine.ProductDetails).ClickAddProductButton();
            }
        }
コード例 #3
0
        /// <summary>
        /// Function to parse internal info data.
        /// </summary>
        /// <param name="featureData"></param>
        /// <returns></returns>

        public static InternalInfoData GetInternalInfoData(ParsedTestData featureData)
        {
            object internalInfoFeatureData = DataAccess.GetKeyJsonData(featureData, "InternalInfoSection");

            return(JsonDataParser <InternalInfoData> .ParseData(internalInfoFeatureData));
        }
コード例 #4
0
        public static UpdateCustomerData GetUpdateCustomerData(ParsedTestData featureData)
        {
            object updateCustomerFeatureData = DataAccess.GetKeyJsonData(featureData, "customer1");

            return(JsonDataParser <UpdateCustomerData> .ParseData(updateCustomerFeatureData));
        }
コード例 #5
0
        public static NewCustomerData GetCustomerData(ParsedTestData featureData)
        {
            object newCustomerFeatureData = DataAccess.GetKeyJsonData(featureData, "customer1");

            return(JsonDataParser <NewCustomerData> .ParseData(newCustomerFeatureData));
        }
コード例 #6
0
        public static LoginData GetLoginDataByKey(ParsedTestData loginFeatureParsedData, string key)
        {
            object loginDataByKey = DataAccess.GetKeyJsonData(loginFeatureParsedData, key);

            return(JsonDataParser <LoginData> .ParseData(loginDataByKey));
        }