示例#1
0
                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);
                }
示例#2
0
                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));
                }
示例#3
0
 /// <summary>PUT</summary>
 public int Put(AnotherFoo <T1> x)
 {
     return(0);
 }
示例#4
0
 /// <summary> Template object test </summary>
 public string Put(AnotherFoo <T> x)
 {
     return("Gets a template");
 }
示例#5
0
 public string GetTemplate(AnotherFoo <T> value)
 {
     return("Gets a template");
 }
示例#6
0
 /// <summary>PATCH</summary>
 public int Patch(AnotherFoo <T2> y, IEnumerable <T3> x)
 {
     return(0);
 }