Esempio n. 1
0
        public void Cf_cache_is_valid_after_successful_load()
        {
            var ctx       = new Context();
            var testCfObj = new CustomFormatCache();

            ctx.ServiceCache.Load <CustomFormatCache>().Returns(testCfObj);

            ctx.Persister.Load();
            ctx.Persister.CfCache.Should().BeSameAs(testCfObj);
        }
Esempio n. 2
0
        public void Save_works_with_valid_cf_cache()
        {
            var ctx       = new Context();
            var testCfObj = new CustomFormatCache();

            ctx.ServiceCache.Load <CustomFormatCache>().Returns(testCfObj);

            ctx.Persister.Load();
            ctx.Persister.Save();

            ctx.ServiceCache.Received().Save(Arg.Is(testCfObj));
        }