コード例 #1
0
        public void Send_Msg_Throw_Exception_Should_Not_Break()
        {
            A.CallTo(() => fakeBus.Publish("test_topic", A <EasyCachingMessage> ._)).Throws((arg) => new Exception());

            fakeHybrid.Remove("fake-remove");

            Assert.True(true);
        }
コード例 #2
0
        public void Send_Msg_Throw_Exception_Should_Not_Break()
        {
            var(hybridProvider, _, _, _) = CreateCachingProviderWithFakes(
                setupFakeBus: bus =>
                A.CallTo(() => bus.Publish("test_topic", A <EasyCachingMessage> ._)).Throws(new InvalidOperationException()));

            hybridProvider.Remove("fake-remove");

            Assert.True(true);
        }
コード例 #3
0
        public void Set_And_Remove_Should_Succeed()
        {
            var cacheKey = $"{_namespace}_{Guid.NewGuid().ToString()}";

            hybridCaching_1.Set(cacheKey, "val", TimeSpan.FromSeconds(30));

            hybridCaching_1.Remove(cacheKey);

            var res = hybridCaching_1.Exists(cacheKey);

            Assert.False(res);
        }