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)); } }
/// <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()); }
public IFakeScope Create() { return(FakeScope.Create()); }
/// <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)); }
public IFakeScope Create(IFakeObjectContainer container) { return(FakeScope.Create(container)); }