示例#1
0
 public RecordingCallRule(FakeManager fakeManager, RecordedCallRule recordedRule, FakeAsserter.Factory asserterFactory, IFakeObjectCallFormatter callFormatter)
 {
     this.fakeManager     = fakeManager;
     this.recordedRule    = recordedRule;
     this.asserterFactory = asserterFactory;
     this.callFormatter   = callFormatter;
 }
示例#2
0
        public CallWriterTests()
        {
            this.callComparer  = A.Fake <IEqualityComparer <IFakeObjectCall> >();
            this.callFormatter = A.Fake <IFakeObjectCallFormatter>();

            A.CallTo(() => this.callFormatter.GetDescription(A <IFakeObjectCall> ._))
            .Returns("Default call description");

            this.calls  = new List <IFakeObjectCall>();
            this.writer = ServiceLocator.Current.Resolve <StringBuilderOutputWriter>();
        }
示例#3
0
        public void SetUp()
        {
            this.fakedObject   = A.Fake <IFoo>();
            this.fakeObject    = Fake.GetFakeManager(fakedObject);
            this.recordedRule  = A.Fake <RecordedCallRule>(x => x.WithArgumentsForConstructor(() => new RecordedCallRule(A.Fake <MethodInfoManager>())));
            this.callFormatter = A.Fake <IFakeObjectCallFormatter>();

            this.asserter = A.Fake <IFakeAsserter>();

            this.asserterFactory = x =>
            {
                this.argumentUsedForAsserterFactory = x;
                return(this.asserter);
            };
        }
        public void Setup()
        {
            this.fakedObject = A.Fake<IFoo>();
            this.fakeObject = Fake.GetFakeManager(this.fakedObject);
            this.recordedRule = A.Fake<RecordedCallRule>(x => x.WithArgumentsForConstructor(() => new RecordedCallRule(A.Fake<MethodInfoManager>())));
            this.callFormatter = A.Fake<IFakeObjectCallFormatter>();

            this.asserter = A.Fake<IFakeAsserter>();

            this.asserterFactory = x =>
                {
                    this.argumentUsedForAsserterFactory = x;
                    return this.asserter;
                };
        }
示例#5
0
 public CallWriter(IFakeObjectCallFormatter callFormatter, IEqualityComparer<IFakeObjectCall> callComparer)
 {
     this.callFormatter = callFormatter;
     this.callComparer = callComparer;
 }
示例#6
0
 public CallWriter(IFakeObjectCallFormatter callFormatter, IEqualityComparer <IFakeObjectCall> callComparer)
 {
     this.callFormatter = callFormatter;
     this.callComparer  = callComparer;
 }