This commit is contained in:
Eugene Sadovoi 2019-04-25 20:53:08 -04:00
Родитель 48ab1a115f
Коммит b3d76041e4
2 изменённых файлов: 8 добавлений и 4 удалений

Просмотреть файл

@ -6,8 +6,8 @@
</PropertyGroup>
<PropertyGroup>
<UnityAbstractionsVersion>4.1.*</UnityAbstractionsVersion>
<UnityContainerVersion>5.10.*</UnityContainerVersion>
<UnityAbstractionsVersion>5.11.*</UnityAbstractionsVersion>
<UnityContainerVersion>5.11.*</UnityContainerVersion>
</PropertyGroup>
</Project>

Просмотреть файл

@ -142,8 +142,12 @@ namespace Microsoft.Practices.Unity.Tests
public void RegistersAllTypesWithHelperMethods()
{
IUnityContainer container = new UnityContainer();
container.RegisterTypes(AllClasses.FromLoadedAssemblies(), WithMappings.FromAllInterfaces,
WithName.TypeName, global::Unity.RegistrationByConvention.WithLifetime.ContainerControlled, overwriteExistingMappings: true);
container.RegisterTypes(AllClasses.FromLoadedAssemblies(),
WithMappings.FromAllInterfaces,
WithName.TypeName,
WithLifetime.ContainerControlled, overwriteExistingMappings: true);
var registrations = container.Registrations.Where(r => r.MappedToType == typeof(MockLogger)).ToArray();
Assert.AreEqual(1, registrations.Length);