public void GetRegistrationName_MultimappingBehaviorButOnlyOneMappingForThatType_ReturnsNull() { var mappings = new[] { new TypeMapping(typeof(Object), typeof(String)) }; var factory = new RegistrationNameFactory(GetFactory(), mappings, MappingBehaviors.MultimapByDefault); // Act var name = factory.GetRegistrationName(mappings.First()); // Assert Assert.IsNull(name); }
public void GetRegistrationName_MultimappingBehaviorManyMappingsForThatType_ReturnsDefaultName() { var mappings = new[] { new TypeMapping(typeof(Object), typeof(String)), new TypeMapping(typeof(Object), typeof(Exception)) }; var factory = new RegistrationNameFactory(GetFactory(), mappings, MappingBehaviors.MultimapByDefault); // Act var name = factory.GetRegistrationName(mappings.First()); // Assert Assert.AreEqual("System.String", name); }
public void GetRegistrationName_MultimappingBehaviorManyMappingsAcrossManyTypes_ReturnsNull() { var mappings = new[] { new TypeMapping(typeof(Object), typeof(String)), new TypeMapping(typeof(Exception), typeof(Exception)) }; var factory = new RegistrationNameFactory(GetFactory(), mappings, MappingBehaviors.MultimapByDefault); // Act var name = factory.GetRegistrationName(mappings.First()); // Assert Assert.IsNull(name); }