public void ThatThrowsAnExceptionIfNeitherTheBaseAutoContainerNorTheSecondaryResolverCanResolve()
                {
                    var foo        = new Foo(0);
                    var anotherFoo = new AnotherFoo();

                    var primary   = new AutoContainer(foo);
                    var secondary = new AutoContainer(anotherFoo);

                    _mergedContainer = primary.MergeWith(secondary);

                    Assert.That(() => Get <NeedsAnIFooAndAnIBar>(), Throws.Exception);
                }
                public void ThatReturnsWhatTheSecondaryResolverReturnsIfTheBaseAutoContainerCannotResolve()
                {
                    var foo        = new Foo(0);
                    var bar        = new Bar();
                    var anotherFoo = new AnotherFoo();

                    var primary   = new AutoContainer(foo);
                    var secondary = new AutoContainer(bar, anotherFoo);

                    _mergedContainer = primary.MergeWith(secondary);

                    var result = Get <NeedsAnIFooAndAnIBar>();

                    Assert.That(result.TheBar, Is.SameAs(bar));
                }
 /// <summary>PUT</summary>
 public int Put(AnotherFoo <T1> x)
 {
     return(0);
 }
Exemple #4
0
 /// <summary> Template object test </summary>
 public string Put(AnotherFoo <T> x)
 {
     return("Gets a template");
 }
Exemple #5
0
 public string GetTemplate(AnotherFoo <T> value)
 {
     return("Gets a template");
 }
Exemple #6
0
 /// <summary>PATCH</summary>
 public int Patch(AnotherFoo <T2> y, IEnumerable <T3> x)
 {
     return(0);
 }