blob: 71cd91d5fd810ca6aa89b4b9656cc664bf20d595 [file] [log] [blame]
using System;
using Xunit;
using Apache.Geode.DotNetCore;
using Apache.Geode.Session;
using System.IO;
namespace Apache.Geode.Session.Tests
{
[Trait("Category", "Integration")]
public class SessionStateStoreTests : IDisposable
{
private static string _regionName = "testRegion";
private Cache Cache { get; set; }
private string CacheXmlFilePath { get; set; }
private string GeodePropertiesFilePath { get; set; }
private const string CacheXmlFileNameKey = "cache-xml-file";
public SessionStateStoreTests()
{
//SessionStateCache.IsInitialized = false;
}
public void Dispose()
{
try
{
Cache.Close();
}
catch (Exception)
{
}
}
[Fact]
public void NullPoolFactory_Throws()
{
PoolFactory poolFactory = null;
var cacheFactory = CacheFactory.Create()
.SetProperty("log-level", "debug")
.SetProperty("log-file", "SessionStateCacheTests.log");
var cache = (Cache)cacheFactory.CreateCache();
Assert.Throws<ArgumentNullException>(() => new SessionStateCache(cache, _regionName));
}
}
}