public void WhenSetTwoCachePropertiesInTwoActionsThenSetTheTwoValuesWithoutLostTheFirst() { var hbm = new HbmIdbag { name = "Children" }; var mapper = new IdBagMapper(typeof(Animal), typeof(Animal), hbm); mapper.Cache(ch => ch.Region("pizza")); mapper.Cache(ch => ch.Usage(CacheUsage.NonstrictReadWrite)); var hbmCache = hbm.cache; Assert.That(hbmCache, Is.Not.Null); Assert.That(hbmCache.region, Is.EqualTo("pizza")); Assert.That(hbmCache.usage, Is.EqualTo(HbmCacheUsage.NonstrictReadWrite)); }
public void WhenSetTwoCachePropertiesInTwoActionsThenSetTheTwoValuesWithoutLostTheFirst() { var hbm = new HbmIdbag { name = "Children" }; var mapper = new IdBagMapper(typeof(Animal), typeof(Animal), hbm); mapper.Cache(ch => ch.Region("pizza")); mapper.Cache(ch => ch.Usage(CacheUsage.NonstrictReadWrite)); var hbmCache = hbm.cache; hbmCache.Should().Not.Be.Null(); hbmCache.region.Should().Be("pizza"); hbmCache.usage.Should().Be(HbmCacheUsage.NonstrictReadWrite); }
public void CanSetCache() { var hbm = new HbmIdbag { name = "Children" }; var mapper = new IdBagMapper(typeof(Animal), typeof(Animal), hbm); mapper.Cache(x => x.Region("pizza")); Assert.That(hbm.cache, Is.Not.Null); }
public void CanSetCache() { var hbm = new HbmIdbag { name = "Children" }; var mapper = new IdBagMapper(typeof(Animal), typeof(Animal), hbm); mapper.Cache(x => x.Region("pizza")); hbm.cache.Should().Not.Be.Null(); }