public void ClearAllCache_HandlesNoCodeTableCache()
        {
            Mock<IJustWareApi> api = new Mock<IJustWareApi>();
                    Mock<ICodeTableCache> cache = new Mock<ICodeTableCache>();
                    CodeLookupHelper helper = new CodeLookupHelper(api.Object);

                    helper.ClearAllCache();

                    //As long as we didn't crash because we have no cache, everything is happy.
        }
        public void ClearAllCache_HandlesNoCodeTableCache()
        {
            Mock <IJustWareApi>    api    = new Mock <IJustWareApi>();
            Mock <ICodeTableCache> cache  = new Mock <ICodeTableCache>();
            CodeLookupHelper       helper = new CodeLookupHelper(api.Object);

            helper.ClearAllCache();

            //As long as we didn't crash because we have no cache, everything is happy.
        }
        public void ClearAllCache_CallsClearAllCacheOnCodeTableCache()
        {
            Mock<IJustWareApi> api = new Mock<IJustWareApi>();
                    Mock<ICodeTableCache> cache = new Mock<ICodeTableCache>();
                    CodeLookupHelper helper = new CodeLookupHelper(api.Object, cache.Object);

                    helper.ClearAllCache();

                    cache.Verify(c => c.ClearAllCache(), Times.Once(), "ClearAllCache was not called on the CodeTableCache");
        }
        public void ClearAllCache_CallsClearAllCacheOnCodeTableCache()
        {
            Mock <IJustWareApi>    api    = new Mock <IJustWareApi>();
            Mock <ICodeTableCache> cache  = new Mock <ICodeTableCache>();
            CodeLookupHelper       helper = new CodeLookupHelper(api.Object, cache.Object);

            helper.ClearAllCache();

            cache.Verify(c => c.ClearAllCache(), Times.Once(), "ClearAllCache was not called on the CodeTableCache");
        }