using Microsoft.Extensions.Caching.Memory; using Moq; namespace MesaFabApproval.API.Test; public static class MockMemoryCacheService { public static Mock GetMemoryCache(object expectedValue) { Mock mockMemoryCache = new Mock(); mockMemoryCache .Setup(x => x.TryGetValue(It.IsAny(), out expectedValue)) .Returns(true); mockMemoryCache .Setup(x => x.CreateEntry(It.IsAny())) .Returns(Mock.Of()); return mockMemoryCache; } }