コード例 #1
0
		public void Correctly_saves_deployment()
		{
			var deployment = new Deployment();

			var mocks = new MockRepository();
			var repository = mocks.CreateMock<IPersistentObjectRepository>();

			using (mocks.Record())
			{
				repository.ConfigurationFile = "deployer.hibernate.cfg.xml";
				repository.Save(deployment);
			}

			using (mocks.Playback())
			{
				IDeploymentRepository deploymentRepository = new DeploymentRepository(repository);

				deploymentRepository.Save(deployment);
			}
		}