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>(); }
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>(); }