public void CanSetInclude() { var hbmCache = new HbmCache(); var mapper = new CacheMapper(hbmCache); mapper.Include(CacheInclude.NonLazy); hbmCache.include.Should().Be(HbmCacheInclude.NonLazy); }
public void CanSetUsage() { var hbmCache = new HbmCache(); var mapper = new CacheMapper(hbmCache); mapper.Usage(CacheUsage.ReadWrite); hbmCache.usage.Should().Be(HbmCacheUsage.ReadWrite); }
public void CanSetRegion() { var hbmCache = new HbmCache(); var mapper = new CacheMapper(hbmCache); mapper.Region("pizza"); hbmCache.region.Should().Be("pizza"); }
/// <summary> /// Transfers the child cache objects to current instance from the source instance. /// Useful for mantaining the cache even in case of refreshes to shard map objects. /// </summary> /// <param name="source">Source cached shard map to copy child objects from.</param> internal void TransferStateFrom(CacheShardMap source) { this.Mapper = source.Mapper; }