public void Can_Write_Config()
		{
			var sut = new FileConfigurationPersister();

			var nhibernateConfig = new Configuration();
			nhibernateConfig.SetProperty("blah", "value");

			sut.WriteConfiguration(TestCache, nhibernateConfig);
			
			Assert.That(File.Exists(TestCache), "Cache file doesn't exist");
		}
Exemplo n.º 2
0
        public void Can_Write_Config()
        {
            var sut = new FileConfigurationPersister();

            var nhibernateConfig = new Configuration();

            nhibernateConfig.SetProperty("blah", "value");

            sut.WriteConfiguration(TestCache, nhibernateConfig);

            Assert.That(File.Exists(TestCache), "Cache file doesn't exist");
        }
		public void Can_Write_And_Read_Config()
		{
			const string key = "key";
			const string value = "value";
			var sut = new FileConfigurationPersister();

			var nhibernateConfig = new Configuration();

			nhibernateConfig.SetProperty(key, value);

			sut.WriteConfiguration(TestCache, nhibernateConfig);

			Configuration result = sut.ReadConfiguration(TestCache);

			Assert.That(result, Is.Not.Null);
			Assert.That(result.Properties[key] == value, "Deserialized config doesn't contain property value");
		}
Exemplo n.º 4
0
        public void Can_Write_And_Read_Config()
        {
            const string key   = "key";
            const string value = "value";
            var          sut   = new FileConfigurationPersister();

            var nhibernateConfig = new Configuration();

            nhibernateConfig.SetProperty(key, value);

            sut.WriteConfiguration(TestCache, nhibernateConfig);

            Configuration result = sut.ReadConfiguration(TestCache);

            Assert.That(result, Is.Not.Null);
            Assert.That(result.Properties[key] == value, "Deserialized config doesn't contain property value");
        }