Esempio n. 1
0
        public void FetchMany_VerifyMGetCall_Once()
        {
            // Arrange.
            var splitNames = new List <string> {
                "Split_1", "Split_2", "Split_3"
            };

            _redisAdapterMock
            .Setup(mock => mock.MGet(It.IsAny <RedisKey[]>()))
            .Returns(new RedisValue[3]);

            // Act.
            var result = _redisSplitCache.FetchMany(splitNames);

            // Assert.
            _redisAdapterMock.Verify(mock => mock.MGet(It.IsAny <RedisKey[]>()), Times.Once);
            _redisAdapterMock.Verify(mock => mock.Get(It.IsAny <string>()), Times.Never);
        }