Ejemplo n.º 1
0
        public void RemoveSplit_ReturnsNotImplementedException()
        {
            //Act
            var result = _redisSplitCache.RemoveSplit("splitName");

            // Assert.
            Assert.IsFalse(result);
        }
Ejemplo n.º 2
0
        public void RemoveSplitShouldReturnFalseOnException()
        {
            //Arrange
            var splitName        = "test_split";
            var redisAdapterMock = new Mock <IRedisAdapter>();

            redisAdapterMock.Setup(x => x.Del(splitKeyPrefix + "test_split")).Returns(false);
            var splitCache = new RedisSplitCache(redisAdapterMock.Object);

            //Act
            var isRemoved = splitCache.RemoveSplit(splitName);

            //Assert
            Assert.IsFalse(isRemoved);
        }
Ejemplo n.º 3
0
        public void RemoveSplitTest()
        {
            //Arrange
            var splitName        = "test_split";
            var redisAdapterMock = new Mock <IRedisAdapter>();

            redisAdapterMock.Setup(x => x.Del(splitKeyPrefix + "test_split")).Returns(true);
            string value = null;

            redisAdapterMock.Setup(x => x.Get(splitKeyPrefix + "test_split")).Returns(value);
            var splitCache = new RedisSplitCache(redisAdapterMock.Object);

            //Act
            var isRemoved = splitCache.RemoveSplit(splitName);
            var result    = splitCache.GetSplit(splitName);

            //Assert
            Assert.IsTrue(isRemoved);
            Assert.IsNull(result);
        }
Ejemplo n.º 4
0
 public void RemoveSplit_ReturnsNotImplementedException()
 {
     //Act
     var isRemoved = _redisSplitCache.RemoveSplit("splitName");
 }