Esempio n. 1
0
        public void CreatingNewScope_with_container_sets_that_container_to_scope()
        {
            var newContainer = A.Fake <IFakeObjectContainer>();

            using (FakeScope.Create(newContainer))
            {
                Assert.That(FakeScope.Current.FakeObjectContainer, Is.SameAs(newContainer));
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Creates a new scope and sets it as the current scope. When the scope is disposed
 /// all expectations set up within the scope will be verified.
 /// </summary>
 /// <returns>The created scope.</returns>
 public static IDisposable CreateScope()
 {
     return(FakeScope.Create());
 }
Esempio n. 3
0
 public IFakeScope Create()
 {
     return(FakeScope.Create());
 }
Esempio n. 4
0
 /// <summary>
 /// Creates a new scope and sets it as the current scope. When inside a scope the
 /// getting the calls made to a fake will return only the calls within that scope and when
 /// asserting that calls were made, the calls must have been made within that scope.
 /// </summary>
 /// <param name="container">The container to use within the specified scope.</param>
 /// <returns>The created scope.</returns>
 public static IDisposable CreateScope(IFakeObjectContainer container)
 {
     return(FakeScope.Create(container));
 }
Esempio n. 5
0
 public IFakeScope Create(IFakeObjectContainer container)
 {
     return(FakeScope.Create(container));
 }