public void AttemptToMapAPropertyAfterFinishThrows()
 {
     this.extension.initialize = delegate(ExtensionContext context)
     {
         PolicyBuilder <TestClass, TestClassConfiguration> policyBuilder
             = new PolicyBuilder <TestClass, TestClassConfiguration>("foo", this.configuration,
                                                                     c => new TestClass());
         policyBuilder.AddPoliciesToPolicyList(context.Policies);
         policyBuilder.SetProperty(o => o.Prop1).To(c => c.Prop1);
     };
     container.AddExtension(this.extension);
 }
 public void IncompletePropertyMappingThrows()
 {
     this.extension.initialize = delegate(ExtensionContext context)
     {
         // can't use the fluent approach, the fluent API doesn't allow for this scenario.
         Microsoft.Practices.EnterpriseLibrary.Common.Configuration.Unity.Fluent.IPropertyAndFinishPolicyBuilding <TestClass, TestClassConfiguration> builder
             = new PolicyBuilder <TestClass, TestClassConfiguration>("foo", this.configuration,
                                                                     c => new TestClass());
         builder.SetProperty(o => o.Prop1);                      // unfinished property
         builder.AddPoliciesToPolicyList(context.Policies);
     };
     container.AddExtension(this.extension);
 }