示例#1
0
        public void Setup()
        {
            // Let Ditto know that we're running in a unit-test scenario (in debug mode)
            Ditto.IsRunningInUnitTest = true;
            Ditto.IsDebuggingEnabled  = Ditto.GetDebugFlag();

            // Configure the accessor to use the mock contexts
            Ditto.RegisterContextAccessor <MockDittoContextAccessor>();
        }
示例#2
0
        public void Setup()
        {
            this.content = new MockPublishedContent
            {
                Id         = 1234,
                Name       = "MyCustomName",
                Properties = new[] { new MockPublishedContentProperty("item", "myValue") }
            };

            // Try running at a complete minimum, strip back everything
            Ditto.RegisterContextAccessor <NullContextAccessor>();
            Ditto.RegisterDefaultProcessorType <NullProcessorAttribute>();
            Ditto.DeregisterPostProcessorType <HtmlStringAttribute>();
            Ditto.DeregisterPostProcessorType <EnumerableConverterAttribute>();
            Ditto.DeregisterPostProcessorType <RecursiveDittoAttribute>();
            Ditto.DeregisterPostProcessorType <TryConvertToAttribute>();

            // pre-load the type config
            DittoTypeInfoCache.Add <BasicModel>();
        }
 public void Setup()
 {
     Ditto.RegisterContextAccessor <MockDittoContextAccessor>();
 }