public static void Resolve_ReturnsSameResult_ForSameInput()
        {
            // Arrange
            var inner = Substitute.For <ICompositeViewTypeResolver>();

            inner.Resolve(typeof(String)).Returns(typeof(Int32));

            var resolver = new CachedCompositeViewTypeResolver(inner);

            // Act
            var result1 = resolver.Resolve(typeof(String));
            var result2 = resolver.Resolve(typeof(String));

            // Assert
            Assert.Equal(result1, result2);
        }
        public static void Resolve_CachesInnerResolverCalls()
        {
            // Arrange
            var inner = Substitute.For <ICompositeViewTypeResolver>();

            inner.Resolve(typeof(String)).Returns(typeof(Int32));

            var resolver = new CachedCompositeViewTypeResolver(inner);

            // Act
            resolver.Resolve(typeof(String));
            resolver.Resolve(typeof(String));

            // Assert
            inner.Received(1).Resolve(typeof(String));
            Assert.True(true);
        }