コード例 #1
0
        public void TestWriteIntRefEnum()
        {
            var test = new Mock <IMock>().CreateProxy(new MyMock(), new Aop.InterceptCompileSetting()
            {
                BoxArgument = true, StoreArgument = true
            }, new Aop.IInterceptor[1] {
                new Aop.IInterceptors.OutputAllArgsInterceptor()
            });
            int a  = 2;
            AEG ed = AEG.E;

            test.WriteRef(a, ref ed);
        }
コード例 #2
0
        public void TestWriteIntOutEnum2()
        {
            var test = new Mock <IMock>().CreateProxy(new MyMock(), new Aop.InterceptCompileSetting()
            {
                BoxArgument = false
            }, new Aop.IInterceptor[1] {
                new Aop.IInterceptors.OutputAllArgsInterceptor()
            });
            int a  = 2;
            AEG ed = AEG.E;

            test.WriteOut(a, out ed);
        }
コード例 #3
0
        public void TestCreateRefMyClassMockObject()
        {
            var mock = new Mock <RefMyClass>();
            AEG moca = AEG.E;

            mock.Setup(x => x.Write(out moca)).Void((x) => { Console.WriteLine(x.GetType()); });
            var test = mock.CreateIllusive();

            //test.Id = 55;
            //Console.WriteLine(test.Id);
            //test.ActionCallBack += Test_ActionCallBack;
            //test.Write(new Program());
            //test.ActionCallBack -= Test_ActionCallBack;

            //test.Write(new Program());

            // object moca = new MyMock();

            test.Write(out moca);

            var typeo = typeof(AEG);
        }
コード例 #4
0
 public override void Write(out AEG mock)
 {
     base.Write(out mock);
 }
コード例 #5
0
 public virtual void Write(out AEG mock)
 {
     mock = default(AEG);
 }
コード例 #6
0
 public void WriteRef(int abc, ref AEG ed)
 {
     mock.WriteRef(abc, ref ed);
 }
コード例 #7
0
 public void WriteOut(int abc, out AEG ed)
 {
     mock.WriteOut(abc, out ed);
 }
コード例 #8
0
 public void Write(int abc, AEG ed)
 {
     mock.Write(abc, ed);
 }
コード例 #9
0
 public void Write(Program p, AEG ed)
 {
     mock.Write(p, ed);
 }
コード例 #10
0
 public void Write(AEG ed)
 {
     mock.Write(ed);
 }