Esempio n. 1
0
        public void GetString_must_return_personMockData()
        {
            string key = "personList";

            provider.Delete(key);

            var persons = MockData.GetPersonsMock();

            var timeOut = new TimeSpan(0, 0, 15);

            bool actual = provider.Add(key, persons, timeOut);

            actual.Should().BeTrue();

            var redisPersons = provider.GetString <List <Person> >(key);

            foreach (var person in persons)
            {
                bool exist = redisPersons.FirstOrDefault(x => x.Id == person.Id) != null;

                exist.Should().BeTrue();
            }
        }