public void TestUnsupportedAttachments()
        {
            var unsupported = TestUtils.CreateAttachment("unsupported.vsd", "unsupported.vsd", "1");

            var model = new ProtectTaskPaneModel();
            model.AddAttachment(unsupported);
            var cache = new AttachmentsModelCache(model);

            bool attachmentAdded = false;
            model.StatusUpdate += (sender, args) =>
                                      {
                                          attachmentAdded = true;
                                      };

            SpinWait.SpinUntil(() => attachmentAdded, 30000);

            cache.ResetCache();
            Assert.IsTrue(cache.AnyAttachmentsOf(SearchModel.UnSupported));
        }
        public void TestAnyAttachmentsOfPasswordProtected()
        {
            var passwordProtected = TestUtils.CreateAttachment("password.pptx", "password.pptx", "1");
            
            var model = new ProtectTaskPaneModel();
            model.AddAttachment(passwordProtected);
            var cache = new AttachmentsModelCache(model);

            bool attachmentAdded = false;
            model.StatusUpdate += (sender, args) =>
            {
                attachmentAdded = true;
            };

            SpinWait.SpinUntil(() => attachmentAdded, 30000);

            cache.ResetCache();

            Assert.IsTrue(cache.AnyAttachmentsOf(SearchModel.PasswordProtected));
        }