Esempio n. 1
0
        public IActionResult Input(int id, CacheDirection?direction, [FromBody] string input)
        {
            // By making the enum nullable, the binder will return a 404 when neither of the enum values is passed

            string decodedJson = DecodingHelper.Decode(input.ToString());

            CachingHelper.Add(id, decodedJson, direction.Value);
            return(Ok());
        }
Esempio n. 2
0
 public void AddAndGetItemInLRightStore()
 {
     CachingHelper.Add(1, "zxcvb", CacheDirection.RIGHT);
     Assert.Equal("zxcvb", CachingHelper.Get(1, CacheDirection.RIGHT));
 }
Esempio n. 3
0
 public void AddAndGetItemInLeftStore()
 {
     CachingHelper.Add(1, "asdfg", CacheDirection.LEFT);
     Assert.Equal("asdfg", CachingHelper.Get(1, CacheDirection.LEFT));
 }