コード例 #1
0
        public void WhenReferencingAType_AndMappedTypeExistsWithMultipleMappings_ReturnTheMappedType()
        {
            var result1 = new EventTypeResolver().Resolve("Some multi bound type 1");
            var result2 = new EventTypeResolver().Resolve("Some multi bound type 2");
            var result3 = new EventTypeResolver().Resolve("Some multi bound type 3");

            result1.Should().Be<SomeMultiBoundType>();
            result2.Should().Be<SomeMultiBoundType>();
            result3.Should().Be<SomeMultiBoundType>();
        }
コード例 #2
0
 public void WhenReferencingAType_AndTypeIsNotInAppDomainButAMappedTypeExist_ReturnTheMappedType()
 {
     var result = new EventTypeResolver().Resolve("Some arbitrarily bound type");
     result.Should().Be<SomeBoundType>();
 }
コード例 #3
0
 public void WhenReferencingAType_AndTypeIsNotInAppDomainButADefaultEventMappedTypeExists_ReturnTheMappedType()
 {
     var result = new EventTypeResolver().Resolve("Some Default Event Type");
     result.Should().Be<SomeDefaultEventBoundType>();
 }
コード例 #4
0
 public void WhenReferencingAType_AndTypeIsInAppDomain_ReturnThatType()
 {
     var requiredTypeString = typeof(SomePlainType).FullName;
     var result = new EventTypeResolver().Resolve(requiredTypeString);
     result.Should().Be<SomePlainType>();
 }