public IHttpActionResult CompareShops([FromBody] string receivedString)
            {
                CompareShops x = new CompareShops();
                string       a = x.CompareResults(receivedString);

                return(Ok(a));
            }
        public void UnitTestCompareShopsCompareResultsMethod()
        {
            string infoFilePath;
            var    x = new CompareShops();

            infoFilePath = x.CompareResults();
            var regex = new Regex(@"^[a-zA-Z0-9]:(\\[a-zA-Z0-9]+)+.txt$");

            Assert.IsTrue(regex.IsMatch(infoFilePath));
        }
            public IHttpActionResult CompareShops([FromBody] string receivedString)
            {
                float        spent = 0;
                CompareShops x     = new CompareShops(new WriteToFile());
                List <FromFileToStruct.Product> curr = FromFileToStruct.MakeProductList(receivedString);

                foreach (FromFileToStruct.Product abc in curr)
                {
                    spent += abc.price;
                }
                string a = x.CompareResults(curr);

                UpdateDababase.UpdateDatabase(curr);
                return(Ok(spent + "#" + a));
            }