Example #1
0
        public void GetWriterWhenNoResourceService()
        {
            PythonDesignerLoader loader = new PythonDesignerLoader(new MockDesignerGenerator());

            loader.BeginLoad(new MockDesignerLoaderHost());
            Assert.IsNull(loader.GetResourceWriter(CultureInfo.InvariantCulture));
        }
Example #2
0
        public void Init()
        {
            dummyReader     = new MockResourceReader();
            dummyWriter     = new MockResourceWriter();
            resourceService = new MockResourceService();
            resourceService.SetResourceReader(dummyReader);
            resourceService.SetResourceWriter(dummyWriter);
            host = new MockDesignerLoaderHost();
            host.AddService(typeof(IResourceService), resourceService);
            loader = new PythonDesignerLoader(new MockDesignerGenerator());
            loader.BeginLoad(host);

            reader = loader.GetResourceReader(CultureInfo.InvariantCulture) as MockResourceReader;
            writer = loader.GetResourceWriter(CultureInfo.InvariantCulture) as MockResourceWriter;
        }