コード例 #1
0
        public void Dispose_CacheDisposeIsCalled()
        {
            var cacheMock = new Mock <ICache <object> >();
            var sut       = new CacheAdapter(cacheMock.Object);

            sut.Dispose();

            cacheMock.Verify(x => x.Dispose(), Times.Once);
        }
コード例 #2
0
ファイル: CacheAdapterTests.cs プロジェクト: IanBru/Cashew
        public void Dispose_CacheDisposeIsCalled()
        {
            var cacheMock  = new Mock <ICache <string> >();
            var cacheMock2 = new Mock <ICache <StoredHttpResponseMessage> >();

            var sut = new CacheAdapter(cacheMock.Object, cacheMock2.Object);

            sut.Dispose();

            cacheMock.Verify(x => x.Dispose(), Times.Once);
        }