public void ReturnsDataOfGenericType()
            {
                Recorder.Records.Clear();
                RecordingHandler handler = new RecordingHandler();
                MethodBase       method  = typeof(IGenericSpy <>).GetMethod("GenericReturn");
                Dictionary <MethodBase, List <IInterceptionHandler> > dictionary = new Dictionary <MethodBase, List <IInterceptionHandler> >();
                List <IInterceptionHandler> handlers = new List <IInterceptionHandler>();

                handlers.Add(handler);
                dictionary.Add(method, handlers);

                IGenericSpy <int> result = WrapAndCreateType <IGenericSpy <int>, GenericSpy <int> >(dictionary);
                int value = result.GenericReturn(256.9);

                Assert.Equal(3, Recorder.Records.Count);
                Assert.Equal("Before Method", Recorder.Records[0]);
                Assert.Equal("In method with data 256.9", Recorder.Records[1]);
                Assert.Equal("After Method", Recorder.Records[2]);
                Assert.Equal(default(int), value);
            }
            public void NonGenericMethod()
            {
                Recorder.Records.Clear();
                RecordingHandler handler = new RecordingHandler();
                MethodBase       method  = typeof(IGenericSpy <>).GetMethod("MethodWhichTakesGenericData");
                Dictionary <MethodBase, List <IInterceptionHandler> > dictionary = new Dictionary <MethodBase, List <IInterceptionHandler> >();
                List <IInterceptionHandler> handlers = new List <IInterceptionHandler>();

                handlers.Add(handler);
                dictionary.Add(method, handlers);

                IGenericSpy <int> result = WrapAndCreateType <IGenericSpy <int>, GenericSpy <int> >(dictionary);

                result.MethodWhichTakesGenericData(24);

                Assert.Equal(3, Recorder.Records.Count);
                Assert.Equal("Before Method", Recorder.Records[0]);
                Assert.Equal("In method with data 24", Recorder.Records[1]);
                Assert.Equal("After Method", Recorder.Records[2]);
            }