Beispiel #1
0
        /// <summary>
        /// Creates a new scope and sets it as the current scope.
        /// </summary>
        /// <returns>The created scope.</returns>
        public static FakeScope Create()
        {
            var result = new ChildScope(FakeScope.Current);

            FakeScope.Current = result;
            return(result);
        }
Beispiel #2
0
 public ChildScope(FakeScope parentScope, IFakeObjectContainer container)
 {
     this.parentScope              = parentScope;
     this.rulesField               = new Dictionary <FakeObject, List <CallRuleMetadata> >();
     this.recordedCalls            = new Dictionary <FakeObject, List <ICompletedFakeObjectCall> >();
     this.fakeObjectContainerField = container;
 }
Beispiel #3
0
 public ChildScope(FakeScope parentScope)
 {
     this.parentScope = parentScope;
     this.rulesField  = new List <CallRuleMetadata>();
 }
Beispiel #4
0
 static FakeScope()
 {
     Current = new NullScope();
 }