示例#1
0
            public void WhenNonSerializableTypeThenIsReturnedByGet()
            {
                JsonTestClass actual = _distributedCache.Get <JsonTestClass>("json-test");

                actual.Should().NotBeNull();
                actual.Name.Should().Be("json-test");
            }
示例#2
0
            public async Task WhenNonSerializableTypeThenIsReturnedByGetAsync()
            {
                JsonTestClass actual = await _distributedCache.GetAsync <JsonTestClass>("json-test");

                actual.Should().NotBeNull();
                actual.Name.Should().Be("json-test");
            }
示例#3
0
            public void WhenNonSerializableTypeDoesNotExistThenReturnsNull()
            {
                JsonTestClass actual = _distributedCache.Get <JsonTestClass>("not-exists");

                actual.Should().BeNull();
            }
示例#4
0
            public async Task WhenNonSerializableTypeDoesNotExistThenReturnsNull()
            {
                JsonTestClass actual = await _distributedCache.GetAsync <JsonTestClass>("not-exists");

                actual.Should().BeNull();
            }