Example #1
0
    public void Refresh_ShouldRefreshCache()
    {
        var distributedCacheMock = new Mock <IDistributedCache>();

        distributedCacheMock.Setup(c => c.Refresh(It.IsAny <string>()))
        .Verifiable();

        var cache = new DistributedFlow(distributedCacheMock.Object);

        cache.Refresh("Key");

        distributedCacheMock.Verify(c => c.Refresh(It.IsAny <string>()), Times.Once);
    }