private static IConfigurationService NewConfigurationService(string configFile)
        {
            IConfigurationService service = new FileConfigurationService(
                new DefaultConfigurationFileLoader(),
                new DefaultConfigurationFileSaver(
                    new NetReflectorProjectSerializer()),
                new FileInfo(configFile));

            if (WatchConfigFile)
                service = new FileWatcherConfigurationService(service, new FileChangedWatcher(configFile));

            return new CachingConfigurationService(service);
        }
		public void Setup()
		{
			configurationFileLoaderMock = new DynamicMock(typeof (IConfigurationFileLoader));
			configurationFileSaverMock = new DynamicMock(typeof (IConfigurationFileSaver));
			configFile = new FileInfo("testFileName");

			fileService = new FileConfigurationService((IConfigurationFileLoader) configurationFileLoaderMock.MockInstance,
			                                           (IConfigurationFileSaver) configurationFileSaverMock.MockInstance,
			                                           configFile);

			configurationMock = new DynamicMock(typeof (IConfiguration));
			configuration = (IConfiguration) configurationMock.MockInstance;
		}
        public void TestSerialization()
        {
            DefaultConfigurationFileLoader Loader = new DefaultConfigurationFileLoader();
            FileConfigurationService Service = new FileConfigurationService(Loader, null, new FileInfo(@"C:\Downloads\ccnet.config.xml"));

            IProject project = Service.Load().Projects["mh_refactor_p"];

            string Serialized = Serialize("project", project);
            System.Diagnostics.Debug.WriteLine(Serialized);
            Project Clone = (Project)Deserialize(Serialized);
        }