<commit_before>﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Linq;
using System.Web.Http;
using System.Web.Http.ValueProviders;

namespace Navigation.WebApi.Test
{
	[TestClass]
	public class NavigationDataValueProviderTest
	{
		[TestMethod]
		public void NavigationDataValueProviderFactoryTest()
		{
			NavigationDataValueProviderFactory factory = new NavigationDataValueProviderFactory();
			Assert.IsTrue(factory.GetValueProvider(null) is NavigationDataValueProvider);
		}

		[TestMethod]
		public void NavigationDataValueProviderFactoryRegisteredTest()
		{
			Assert.IsTrue(GlobalConfiguration.Configuration.Services.GetServices(typeof(ValueProviderFactory)).ToList()[0] is NavigationDataValueProviderFactory);
		}

		[TestMethod]
		public void NavigationDataValueProviderValueTest()
		{
			StateController.Navigate("d0");
			StateController.Navigate("t0", new NavigationData { { "a", 1 } });
			NavigationDataValueProvider valueProvider = new NavigationDataValueProvider();
			Assert.AreEqual(1, ((ValueProviderResult)valueProvider.GetValue("a")).RawValue);
			Assert.AreEqual("1", ((ValueProviderResult)valueProvider.GetValue("a")).AttemptedValue);
		}
<commit_msg>Tweaked linq<commit_after>﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Linq;
using System.Web.Http;
using System.Web.Http.ValueProviders;

namespace Navigation.WebApi.Test
{
	[TestClass]
	public class NavigationDataValueProviderTest
	{
		[TestMethod]
		public void NavigationDataValueProviderFactoryTest()
		{
			NavigationDataValueProviderFactory factory = new NavigationDataValueProviderFactory();
			Assert.IsTrue(factory.GetValueProvider(null) is NavigationDataValueProvider);
		}

		[TestMethod]
		public void NavigationDataValueProviderFactoryRegisteredTest()
		{
			Assert.IsTrue(GlobalConfiguration.Configuration.Services.GetServices(typeof(ValueProviderFactory)).First() is NavigationDataValueProviderFactory);
		}

		[TestMethod]
		public void NavigationDataValueProviderValueTest()
		{
			StateController.Navigate("d0");
			StateController.Navigate("t0", new NavigationData { { "a", 1 } });
			NavigationDataValueProvider valueProvider = new NavigationDataValueProvider();
			Assert.AreEqual(1, ((ValueProviderResult)valueProvider.GetValue("a")).RawValue);
			Assert.AreEqual("1", ((ValueProviderResult)valueProvider.GetValue("a")).AttemptedValue);
		}

{'fraction_non_alphanumeric': 0.10320432792342905, 'fraction_numerical': 0.004577611319184353, 'mean_word_length': 7.1768707482993195, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6268429', 'n_tokens_mistral': 738, 'n_tokens_neox': 653, 'n_words': 105}