public void GetCacheKey_WhenItemHasBaseLayoutReferencingSelf_ThrowsCircularReferenceException()
        {
            // Arrange
            var cache = new BaseLayoutValueCache(TestUtil.CreateFakeSettings());
            var id    = new ID();
            var item  = MasterFakesFactory.CreateFakeItem(id, null, null, null, id);

            // Act => Assert
            Assert.Throws <CircularReferenceException>(() => cache.GetCacheKey(item));
        }
        public void GetCacheKey_WithoutCircularReference_ReturnsKeyThatEndsWithItemId()
        {
            // Arrange
            var cache = new BaseLayoutValueCache(TestUtil.CreateFakeSettings());
            var item1 = MasterFakesFactory.CreateFakeItem();
            var item2 = MasterFakesFactory.CreateFakeItem(null, null, null, null, item1.ID);

            // Act
            var result = cache.GetCacheKey(item2);

            // Assert
            Assert.True(result.EndsWith(item2.ID.ToString(), StringComparison.OrdinalIgnoreCase));
        }