public void GetReaderWhenNoResourceService() { PythonDesignerLoader loader = new PythonDesignerLoader(new MockDesignerGenerator()); loader.BeginLoad(new MockDesignerLoaderHost()); Assert.IsNull(loader.GetResourceReader(CultureInfo.InvariantCulture)); }
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; }