Check() static public method

static public Check ( TypedReference r, Object v ) : void
r TypedReference
v Object
return void
示例#1
0
        public void TestTrackEvent()
        {
            // Shims can be used only in a ShimsContext:
            using (ShimsContext.Create())
            {
                Mock <MockShimAnalytics> mock = new Mock <MockShimAnalytics>();
                mock.Object.InitFake();
                mock.Setup(v => v.TrackEvent(It.IsAny <string>(), It.IsAny <IDictionary <string, string> >()));

                MyApp.Check();

                mock.Verify(v => v.TrackEvent(It.IsAny <string>(), It.IsAny <IDictionary <string, string> >()), Times.Once());
            }
        }