Integrating v5 TypeFinder. Imported a few classes from v5 regarding utility classes and partial trust

unit test helper classes. Changed calls from old TypeFinder to new TypeFinder2. Created benchmark unit
tests to test speed differences between them.
Fixes: 30946 - IOHelper with HttpContext issue
Fixes: 30945 - AppCodeFileExtensions issue with UmbracoSettings
This commit is contained in:
shannon@ShandemVaio
2012-07-26 21:12:54 +06:00
parent 5fcd8b1d52
commit 62d6db935d
42 changed files with 2503 additions and 272 deletions

View File

@@ -1,12 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using Umbraco.Core;
using Umbraco.Tests;
using umbraco.BusinessLogic;
namespace Umbraco.Tests
{
[TestFixture]
#region Used for benchmark test: Benchmark_Finding_First_Type_In_Assemblies
#endregion
[TestFixture]
public class EnumerableExtensionsTests
{
[Test]
@@ -33,11 +39,11 @@ namespace Umbraco.Tests
public void DistinctBy_ReturnsDistinctElements_AndResetsIteratorCorrectly()
{
// Arrange
var tuple1 = new Tuple<string, string>("fruit", "apple");
var tuple2 = new Tuple<string, string>("fruit", "orange");
var tuple3 = new Tuple<string, string>("fruit", "banana");
var tuple4 = new Tuple<string, string>("fruit", "banana"); // Should be filtered out
var list = new List<Tuple<string, string>>()
var tuple1 = new System.Tuple<string, string>("fruit", "apple");
var tuple2 = new System.Tuple<string, string>("fruit", "orange");
var tuple3 = new System.Tuple<string, string>("fruit", "banana");
var tuple4 = new System.Tuple<string, string>("fruit", "banana"); // Should be filtered out
var list = new List<System.Tuple<string, string>>()
{
tuple1,
tuple2,