Inheritance: IDeploymentConfigurationStore
		public void SerializationShouldGenerateCorrectXml()
		{
			string expectedXml =
				ResourceHelper.ReadString(
					"Galen.Ci.EntityFramework.Deployer.Tests.Data.SerializationShouldGenerateCorrectXml_Expected.xml");

			string actualXml;

			var config = new DeploymentConfiguration()
			{
				MigrationConfigurationInfo = new MigrationConfigurationInfo
				{
					Type = "Galen.Enterprise.Data.Migrations.SomeContext.Configuration"
				},

				InitializerConfigurationInfo=new InitializerConfigurationInfo
				{
					Type = "Galen.Enterprise.Data.Initializers.SomeContextCreateDatabaseIfNotExists",
					ServiceAccount = new ServiceAccountInfo()
					{
						Name = "SomeWindowsAccountName",
						Domain = "SomeDomainName",
						DatabaseUser = "SomeDbUserName",
						AccountType = "Windows"
					}
				}
			};

			using (var memoryStream = new MemoryStream())
			{
				var sut = new DeploymentConfigurationXmlStore(memoryStream);
				sut.Save(config);

				memoryStream.Position=0;
				using (var sr = new StreamReader(memoryStream))
				{
					actualXml=sr.ReadToEnd();
				}
			}

			Assert.AreEqual(expectedXml, actualXml);
		}
		public void DeserializationShouldResultInCorrectConfiguration()
		{
			byte[] sourceData = ResourceHelper.ReadBytes("Galen.Ci.EntityFramework.Deployer.Tests.Data.DeserializationShouldResultInCorrectConfiguration_Source.xml");
			DeploymentConfiguration actualConfig;
			var expectedConfig = new DeploymentConfiguration()
			{
				MigrationConfigurationInfo=new MigrationConfigurationInfo
		        {
			        Type = "Galen.Enterprise.Data.Migrations.SomeContext.Configuration"
		        },

				InitializerConfigurationInfo=new InitializerConfigurationInfo
				{
					Type = "Galen.Enterprise.Data.Initializers.SomeContextCreateDatabaseIfNotExists",
					ServiceAccount = new ServiceAccountInfo()
					{
						Name = "SomeWindowsAccountName",
						Domain = "SomeDomainName",
						DatabaseUser = "SomeDbUserName",
						AccountType = "Windows"

					}
				}
			};

			using (var stream = new MemoryStream(sourceData))
			{
				var sut = new DeploymentConfigurationXmlStore(stream);
				actualConfig=sut.Load();
			}

			Assert.IsNotNull(actualConfig);
			Assert.IsNotNull(actualConfig.InitializerConfigurationInfo);

		    Assert.IsNotNull(actualConfig.MigrationConfigurationInfo);
		    Assert.AreEqual(expectedConfig.MigrationConfigurationInfo.Type, actualConfig.MigrationConfigurationInfo.Type);

			Assert.AreEqual(expectedConfig.InitializerConfigurationInfo.Type, actualConfig.InitializerConfigurationInfo.Type);

			Assert.IsTrue((actualConfig.InitializerConfigurationInfo.ServiceAccount!=null
							&&expectedConfig.InitializerConfigurationInfo.ServiceAccount!=null)
							||(actualConfig.InitializerConfigurationInfo.ServiceAccount==null
								&&expectedConfig.InitializerConfigurationInfo.ServiceAccount==null), "Service account info mismatch");

			if (actualConfig.InitializerConfigurationInfo.ServiceAccount!=null)
			{
				Assert.AreEqual(expectedConfig.InitializerConfigurationInfo.ServiceAccount.Name, actualConfig.InitializerConfigurationInfo.ServiceAccount.Name);
				Assert.AreEqual(expectedConfig.InitializerConfigurationInfo.ServiceAccount.Domain, actualConfig.InitializerConfigurationInfo.ServiceAccount.Domain);
				Assert.AreEqual(expectedConfig.InitializerConfigurationInfo.ServiceAccount.DatabaseUser, actualConfig.InitializerConfigurationInfo.ServiceAccount.DatabaseUser);
				Assert.AreEqual(expectedConfig.InitializerConfigurationInfo.ServiceAccount.AccountType, actualConfig.InitializerConfigurationInfo.ServiceAccount.AccountType);
				Assert.AreEqual(expectedConfig.InitializerConfigurationInfo.ServiceAccount.DatabaseUserPassword, actualConfig.InitializerConfigurationInfo.ServiceAccount.DatabaseUserPassword);
			}
		}