<commit_before>﻿using System.Linq;
using System.Web.Mvc;
using Xunit;

namespace CsvResult.Tests
{
    public class TestController : Controller
    {

        public class TestClass
        {
            public string FirstName { get; set; }
            public string Surname { get; set; }
        }
        

        public CsvResult Index()
        {

            var data = new[]
            {
                new TestClass
                {
                    FirstName = "firstName",
                    Surname = "Surname"
                },
                new TestClass
                {
                    FirstName = "2ndFirstName",
                    Surname = "2ndsurname"
                }
            };

            return new CsvResult(data);

        }


    }

    public class Tests
    {
        [Fact]
        public void TestControllerShouldReturnTypeOfCsvResult()
        {
            //arrange
            var controller = new TestController();
            //act
            var result = controller.Index();
            //assert
            Assert.IsType<CsvResult>(result);
        }

        [Fact]
        public void TestControllerDefaultMimeTypeShouldBeTextCsv()
        {
            //arrange
            var controller = new TestController();
            //act
            var result = controller.Index();
            //assert
            Assert.Equal("text/csv", result.ContentType);
        }

        [Fact]
        public void TestControllerShouldHaveTwoRows()
        {
            //arrange
            var controller = new TestController();
            //act
            var result = controller.Index();
            //assert
            Assert.Equal(2, result.Data.OfType<TestController.TestClass>().Count());
        }

        [Fact]
        public void TestControllerShouldHaveCorrectData()
        {
            //arrange
            var controller = new TestController();
            //act
            var result = controller.Index();
            //assert
            Assert.Equal("2ndFirstName", result.Data.OfType<TestController.TestClass>().Last().FirstName);
        }


    }
}<commit_msg>stubbing some further tests<commit_after>﻿using System.Linq;
using System.Web.Mvc;
using Xunit;

namespace CsvResult.Tests
{
    public class TestController : Controller
    {

        public class TestClass
        {
            public string FirstName { get; set; }
            public string Surname { get; set; }
        }
        

        public CsvResult Index()
        {

            var data = new[]
            {
                new TestClass
                {
                    FirstName = "firstName",
                    Surname = "Surname"
                },
                new TestClass
                {
                    FirstName = "2ndFirstName",
                    Surname = "2ndsurname"
                }
            };

            return new CsvResult(data);

        }


    }

    public class Tests
    {
        [Fact]
        public void TestControllerShouldReturnTypeOfCsvResult()
        {
            //arrange
            var controller = new TestController();
            //act
            var result = controller.Index();
            //assert
            Assert.IsType<CsvResult>(result);
        }

        [Fact]
        public void TestControllerDefaultMimeTypeShouldBeTextCsv()
        {
            //arrange
            var controller = new TestController();
            //act
            var result = controller.Index();
            //assert
            Assert.Equal("text/csv", result.ContentType);
        }

        [Fact]
        public void TestControllerShouldHaveTwoRows()
        {
            //arrange
            var controller = new TestController();
            //act
            var result = controller.Index();
            //assert
            Assert.Equal(2, result.Data.OfType<TestController.TestClass>().Count());
        }

        [Fact]
        public void TestControllerShouldHaveCorrectData()
        {
            //arrange
            var controller = new TestController();
            //act
            var result = controller.Index();
            //assert
            Assert.Equal("2ndFirstName", result.Data.OfType<TestController.TestClass>().Last().FirstName);
        }

        [Fact(Skip = "not implemented")]
        public void TestControllerShouldRenderCorrectResult()
        {
            //arrange
            var controller = new TestController();
            //act
            var result = controller.Index();
            //assert
            //Assert.Equal("2ndFirstName", result.ExecuteResult());
        }


    }
}
{'fraction_non_alphanumeric': 0.09081127609210243, 'fraction_numerical': 0.001936733376371853, 'mean_word_length': 1.255215914604561, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '947152', 'n_tokens_mistral': 1147, 'n_tokens_neox': 1090, 'n_words': 245}