<commit_before>﻿using System.Linq;
using System.Net;
using System.Net.Http;
using Newtonsoft.Json;
using Xunit;

namespace test
{
    public class ProductFacts : TestBase
    {
        private HttpResponseMessage httpResponseMessage;

        [Fact]
        public void ShouldReturnOk()
        {
            var httpResponseMessage = Server.CreateRequest("api/products").GetAsync().Result;
            Assert.Equal(HttpStatusCode.OK, httpResponseMessage.StatusCode);
        }

        [Fact]
        public void ShouldReturnAllProducts()
        {
            Get2();

            var products = Body(new []
            {
                new
                {
                    Name = default(string)
                
                }
            });

            Assert.Equal(1, products.Count());
            Assert.Equal("Subway", products[0].Name);
        }

        private void Get2()
        {
            var httpResponseMessage1 = Server.CreateRequest("api/products").GetAsync().Result;
            httpResponseMessage = httpResponseMessage1;
        }

        public T Body<T>(T anonymousTypeObject)<commit_msg>introduce path param from Get2<commit_after>﻿using System.Linq;
using System.Net;
using System.Net.Http;
using Newtonsoft.Json;
using Xunit;

namespace test
{
    public class ProductFacts : TestBase
    {
        private HttpResponseMessage httpResponseMessage;

        [Fact]
        public void ShouldReturnOk()
        {
            var httpResponseMessage = Server.CreateRequest("api/products").GetAsync().Result;
            Assert.Equal(HttpStatusCode.OK, httpResponseMessage.StatusCode);
        }

        [Fact]
        public void ShouldReturnAllProducts()
        {
            Get2("api/products");

            var products = Body(new []
            {
                new
                {
                    Name = default(string)
                
                }
            });

            Assert.Equal(1, products.Count());
            Assert.Equal("Subway", products[0].Name);
        }

        private void Get2(string path)
        {
            var httpResponseMessage1 = Server.CreateRequest(path).GetAsync().Result;
            httpResponseMessage = httpResponseMessage1;
        }

        public T Body<T>(T anonymousTypeObject)
{'fraction_non_alphanumeric': 0.09178321678321678, 'fraction_numerical': 0.005681818181818182, 'mean_word_length': 1.725, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1316976', 'n_tokens_mistral': 577, 'n_tokens_neox': 558, 'n_words': 114}