<commit_before>﻿using NUnit.Framework;
using System;
using System.Collections.Generic;
using unQuery.SqlTypes;

namespace unQuery.Tests
{
	public class GetRowTests : TestFixture
	{
		[Test]
		public void GetSingleRow_NoResults()
		{
			var result = DB.GetRow("SELECT * FROM Persons WHERE 1 = 0");

			Assert.IsNull(result);
		}

		[Test]
		public void GetSingleRow_SingleColumn()
		{
			var result = DB.GetRow("SELECT Age FROM Persons WHERE Name = @Name", new { Name = Col.NVarchar("<NAME>") });

			Assert.AreEqual(55, result.Age);
			Assert.AreEqual(1, ((IDictionary<string, object>)result).Count);
		}

		[Test]
		public void GetSingleRow_MultipleColumns()
		{
			var result = DB.GetRow("SELECT Age, Sex FROM Persons WHERE Name = @Name", new { Name = Col.NVarchar("<NAME>") });

			Assert.AreEqual(25, result.Age);
			Assert.AreEqual("M", result.Sex);
			Assert.AreEqual(2, ((IDictionary<string, object>)result).Count);
		}

		[Test]
		public void GetSingleRow_AllColumns()
		{
			var result = DB.GetRow("SELECT * FROM Persons WHERE Name = @Name", new { Name = Col.NVarchar("<NAME>") });

			Assert.AreEqual(5, result.PersonID);
			Assert.AreEqual("<NAME>", result.Name);
			Assert.AreEqual(23, result.Age);
			Assert.AreEqual("M", result.Sex);
			Assert.AreEqual(Convert.ToDateTime("1984-01-07 13:24:42.110"), result.SignedUp);
			Assert.AreEqual(5, ((IDictionary<string, object>)result).Count);
		}

		[Test]
		public void GetSingleRow_MultipleResultsPossible()
		{
			var result = DB.GetRow("SELECT * FROM Persons ORDER BY PersonID");

			Assert.AreEqual(1, result.PersonID);
		}
	}
}<commit_msg>Renamed tests to match implementation name<commit_after>﻿using NUnit.Framework;
using System;
using System.Collections.Generic;
using unQuery.SqlTypes;

namespace unQuery.Tests
{
	public class GetRowTests : TestFixture
	{
		[Test]
		public void GetRow_NoResults()
		{
			var result = DB.GetRow("SELECT * FROM Persons WHERE 1 = 0");

			Assert.IsNull(result);
		}

		[Test]
		public void GetRow_SingleColumn()
		{
			var result = DB.GetRow("SELECT Age FROM Persons WHERE Name = @Name", new { Name = Col.NVarchar("<NAME>") });

			Assert.AreEqual(55, result.Age);
			Assert.AreEqual(1, ((IDictionary<string, object>)result).Count);
		}

		[Test]
		public void GetRow_MultipleColumns()
		{
			var result = DB.GetRow("SELECT Age, Sex FROM Persons WHERE Name = @Name", new { Name = Col.NVarchar("<NAME>") });

			Assert.AreEqual(25, result.Age);
			Assert.AreEqual("M", result.Sex);
			Assert.AreEqual(2, ((IDictionary<string, object>)result).Count);
		}

		[Test]
		public void GetRow_AllColumns()
		{
			var result = DB.GetRow("SELECT * FROM Persons WHERE Name = @Name", new { Name = Col.NVarchar("<NAME>") });

			Assert.AreEqual(5, result.PersonID);
			Assert.AreEqual("<NAME>", result.Name);
			Assert.AreEqual(23, result.Age);
			Assert.AreEqual("M", result.Sex);
			Assert.AreEqual(Convert.ToDateTime("1984-01-07 13:24:42.110"), result.SignedUp);
			Assert.AreEqual(5, ((IDictionary<string, object>)result).Count);
		}

		[Test]
		public void GetRow_MultipleResultsPossible()
		{
			var result = DB.GetRow("SELECT * FROM Persons ORDER BY PersonID");

			Assert.AreEqual(1, result.PersonID);
		}
	}
}
{'fraction_non_alphanumeric': 0.15110833593506087, 'fraction_numerical': 0.018732438339057134, 'mean_word_length': 4.304635761589404, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '6518466', 'n_tokens_mistral': 1233, 'n_tokens_neox': 1062, 'n_words': 235}