Esempio n. 1
0
        public void ShouldReturnTypeRegistration()
        {
            var handlerData =
                new FaultContractExceptionHandlerData("name", typeof(object).AssemblyQualifiedName)
            {
                ExceptionMessage = "message"
            };

            handlerData.Attributes["foo"] = "bar";

            var registration = handlerData.GetRegistrations("prefix").First();

            registration
            .AssertForServiceType(typeof(IExceptionHandler))
            .ForName("prefix.name")
            .ForImplementationType(typeof(FaultContractExceptionHandler));

            NameValueCollection attributes;
            IStringResolver     resolver;

            registration
            .AssertConstructor()
            .WithValueConstructorParameter(out resolver)
            .WithValueConstructorParameter(typeof(object))
            .WithValueConstructorParameter(out attributes)
            .VerifyConstructorParameters();

            CollectionAssert.AreEquivalent(handlerData.Attributes, attributes);
        }
 protected override void Act()
 {
     typeRegistration = configuration.GetRegistrations("prefix").First();
 }
 protected override void Act()
 {
     registrations = configuration.GetRegistrations("");
 }