This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.ServiceModel; | |
| using System.ServiceModel.Channels; | |
| /// <summary> | |
| /// Wraps a service client so you can use "using" without worrying of getting | |
| /// your business exception swallowed. Usage: | |
| /// <example> | |
| /// <code> | |
| /// using(var serviceClient = new ServiceClientWrapper<IServiceContract>) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <summary> | |
| /// Resolves instances using the structure map object factory. | |
| /// </summary> | |
| public class StructureMapInstanceProvider : IInstanceProvider | |
| { | |
| /// <summary> | |
| /// The service type | |
| /// </summary> | |
| private readonly Type serviceType; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Subject(typeof (CommonRegistry))] | |
| public class When_add_common_registry_to_a_container | |
| { | |
| Because of = () => ObjectFactory.Configure(x=>x.Scan(scanner=> | |
| { | |
| scanner.AssemblyContainingType<ISerializer>(); | |
| scanner.LookForRegistries(); | |
| })); | |
| It should_register_a_default_i_serializer = () => ObjectFactory.GetAllInstances<ISerializer>().Count.ShouldBeGreaterThan(0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Diagnostics.CodeAnalysis; | |
| using global::Machine.Fakes; | |
| using global::Machine.Specifications; | |
| /// <summary> | |
| /// Casts the subject as the supplied <typeparamref name="TInterface"/> but | |
| /// creates it using a concrete type and fills in dependencies using the auto faking container. | |
| /// </summary> | |
| /// <typeparam name="TInterface">The type of the interface.</typeparam> | |
| /// <typeparam name="TConcreteType">The type of the concrete type.</typeparam> |
NewerOlder