Skip to content

Commit

Permalink
Got rid of copy/pasted files in Unity4/Unity5 projects. Instead added…
Browse files Browse the repository at this point in the history
… common files as references.
  • Loading branch information
mykolav committed May 30, 2018
1 parent 2cb49d7 commit 6c98342
Show file tree
Hide file tree
Showing 41 changed files with 193 additions and 708 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
using System;
using FluentAssertions;
using Microsoft.Practices.Unity;
using ParameterizedAutoFactory.Unity4.Tests.Support;
using ParameterizedAutoFactory.Unity4.Tests.Support.InjectedTypes;
using ParameterizedAutoFactory.Tests.Support;
using ParameterizedAutoFactory.Tests.Support.InjectedTypes;
using Xunit;
#if UNITY4_0_1
using Microsoft.Practices.Unity;
#elif UNITY5_X
using Unity;
#endif


namespace ParameterizedAutoFactory.Unity4.Tests.Automatic_factory.Creates_instance.Of_type_with
namespace ParameterizedAutoFactory.Tests.Automatic_factory.Creates_instance.Of_type_with
{
public class Ctor_with_one_dependency_param_where
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
using System;
using FluentAssertions;
using Microsoft.Practices.Unity;
using ParameterizedAutoFactory.Unity4.Tests.Support;
using ParameterizedAutoFactory.Unity4.Tests.Support.InjectedTypes;
using ParameterizedAutoFactory.Tests.Support;
using ParameterizedAutoFactory.Tests.Support.InjectedTypes;
using Xunit;
#if UNITY4_0_1
using Microsoft.Practices.Unity;
#elif UNITY5_X
using Unity;
#endif


namespace ParameterizedAutoFactory.Unity4.Tests.Automatic_factory.Creates_instance.Of_type_with
namespace ParameterizedAutoFactory.Tests.Automatic_factory.Creates_instance.Of_type_with
{
public class Ctor_with_one_simple_param_where
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
using System;
using FluentAssertions;
using ParameterizedAutoFactory.Unity5.Tests.Support;
using ParameterizedAutoFactory.Unity5.Tests.Support.InjectedTypes;
using ParameterizedAutoFactory.Tests.Support;
using ParameterizedAutoFactory.Tests.Support.InjectedTypes;
using Xunit;
#if UNITY4_0_1
using Microsoft.Practices.Unity;
#elif UNITY5_X
using Unity;
#endif

namespace ParameterizedAutoFactory.Unity5.Tests.Automatic_factory.Creates_instance.Of_type_with
namespace ParameterizedAutoFactory.Tests.Automatic_factory.Creates_instance.Of_type_with
{
public class Ctor_with_two_dependency_params_where
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
using System;
using FluentAssertions;
using Microsoft.Practices.Unity;
using ParameterizedAutoFactory.Unity4.Tests.Support;
using ParameterizedAutoFactory.Unity4.Tests.Support.InjectedTypes;
using ParameterizedAutoFactory.Tests.Support;
using ParameterizedAutoFactory.Tests.Support.InjectedTypes;
using Xunit;
#if UNITY4_0_1
using Microsoft.Practices.Unity;
#elif UNITY5_X
using Unity;
#endif

namespace ParameterizedAutoFactory.Unity4.Tests.Automatic_factory.Creates_instance.When_null_supplied
namespace ParameterizedAutoFactory.Tests.Automatic_factory.Creates_instance.When_null_supplied
{
public class To_type_with_ctor_with_two_dependency_params
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
using System;
using FluentAssertions;
using Microsoft.Practices.Unity;
using ParameterizedAutoFactory.Unity4.Tests.Support;
using ParameterizedAutoFactory.Unity4.Tests.Support.InjectedTypes;
using ParameterizedAutoFactory.Tests.Support;
using ParameterizedAutoFactory.Tests.Support.InjectedTypes;
using Xunit;
#if UNITY4_0_1
using Microsoft.Practices.Unity;
#elif UNITY5_X
using Unity;
#endif

namespace ParameterizedAutoFactory.Unity4.Tests.Automatic_factory.For_type_with
namespace ParameterizedAutoFactory.Tests.Automatic_factory.For_type_with
{
public class Ctor_with_dependecy_tree
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
using System;
using FluentAssertions;
using ParameterizedAutoFactory.Unity5.Tests.Support;
using ParameterizedAutoFactory.Unity5.Tests.Support.InjectedTypes;
using ParameterizedAutoFactory.Tests.Support;
using ParameterizedAutoFactory.Tests.Support.InjectedTypes;
using Xunit;
#if UNITY4_0_1
using Microsoft.Practices.Unity;
#elif UNITY5_X
using Unity;
using Unity.Exceptions;
using Xunit;
#endif


namespace ParameterizedAutoFactory.Unity5.Tests.Automatic_factory.For_type_with
namespace ParameterizedAutoFactory.Tests.Automatic_factory.For_type_with
{
public class Ctor_with_two_params_of_same_type_with
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
using System;
using FluentAssertions;
using Microsoft.Practices.Unity;
using ParameterizedAutoFactory.Unity4.Tests.Support;
using ParameterizedAutoFactory.Unity4.Tests.Support.InjectedTypes;
using ParameterizedAutoFactory.Tests.Support;
using ParameterizedAutoFactory.Tests.Support.InjectedTypes;
using Xunit;
#if UNITY4_0_1
using Microsoft.Practices.Unity;
#elif UNITY5_X
using Unity;
#endif

namespace ParameterizedAutoFactory.Unity4.Tests.Automatic_factory
namespace ParameterizedAutoFactory.Tests.Automatic_factory
{
public class Of_same_type
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
using System;
using FluentAssertions;
using Microsoft.Practices.Unity;
using ParameterizedAutoFactory.Unity4.Tests.Support.InjectedTypes;
using ParameterizedAutoFactory.Tests.Support.InjectedTypes;
using Xunit;
using ParameterizedAutoFactory.Unity;
#if UNITY4_0_1
using ParameterizedAutoFactory.Unity4;
using Microsoft.Practices.Unity;
#elif UNITY5_X
using Unity;
using ParameterizedAutoFactory.Unity5;
#endif

namespace ParameterizedAutoFactory.Unity4.Tests
namespace ParameterizedAutoFactory.Tests
{
public class Sandbox
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
using Unity;
using ParameterizedAutoFactory.Unity;
#if UNITY4_0_1
using Microsoft.Practices.Unity;
using ParameterizedAutoFactory.Unity4;
#elif UNITY5_X
using ParameterizedAutoFactory.Unity5;
using Unity;
#endif

namespace ParameterizedAutoFactory.Unity5.Tests.Support
namespace ParameterizedAutoFactory.Tests.Support
{
internal class ContainerBuilder
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace ParameterizedAutoFactory.Unity4.Tests.Support.InjectedTypes
namespace ParameterizedAutoFactory.Tests.Support.InjectedTypes
{
public class TypeWithCtorWithOneDependencyParam
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace ParameterizedAutoFactory.Unity4.Tests.Support.InjectedTypes
namespace ParameterizedAutoFactory.Tests.Support.InjectedTypes
{
public class TypeWithCtorWithOneSimpleAndOneDependencyParam
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace ParameterizedAutoFactory.Unity5.Tests.Support.InjectedTypes
namespace ParameterizedAutoFactory.Tests.Support.InjectedTypes
{
public class TypeWithCtorWithOneSimpleParam
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace ParameterizedAutoFactory.Unity4.Tests.Support.InjectedTypes
namespace ParameterizedAutoFactory.Tests.Support.InjectedTypes
{
public class TypeWithCtorWithTwoDependencyParams
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace ParameterizedAutoFactory.Unity4.Tests.Support.InjectedTypes
namespace ParameterizedAutoFactory.Tests.Support.InjectedTypes
{
public class TypeWithCtorWithTwoDependencyParamsOfSameType
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace ParameterizedAutoFactory.Unity4.Tests.Support.InjectedTypes
namespace ParameterizedAutoFactory.Tests.Support.InjectedTypes
{
public class TypeWithCtorWithTwoSimpleParams
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace ParameterizedAutoFactory.Tests.Support.InjectedTypes
{
public class TypeWithParameterlessCtor
{
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
using System.Linq;
using Unity.ParameterizedAutoFactory.Core;
#if UNITY4_0_1
using Microsoft.Practices.ObjectBuilder2;
using Microsoft.Practices.Unity;
using ParameterByTypeOverride=ParameterizedAutoFactory.Unity4.ParameterByTypeOverride;
#elif UNITY5_X
using Unity;
using Unity.Builder;
using Unity.Builder.Strategy;
using Unity.ParameterizedAutoFactory.Core;
using Unity.Resolution;
using ParameterByTypeOverride=ParameterizedAutoFactory.Unity5.ParameterByTypeOverride;
#endif

namespace ParameterizedAutoFactory.Unity5
namespace ParameterizedAutoFactory.Unity
{
/// <summary>
/// The <see cref="PreBuildUp" /> method of this class gets
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#if UNITY4_0_1
using Microsoft.Practices.Unity;
using Microsoft.Practices.Unity.ObjectBuilder;
#elif UNITY5_X
using Unity;
using Unity.Builder;
using Unity.Extension;
#endif

namespace ParameterizedAutoFactory.Unity5
namespace ParameterizedAutoFactory.Unity
{
/// <summary>
/// This is a unity extension class.
Expand Down

This file was deleted.

Loading

0 comments on commit 6c98342

Please sign in to comment.