private void addAttachmentViews(OperationViewModel visModel)
 {
     foreach (var attachmentViewModel in visModel.AttachementViewModels)
     {
         var attachmentView = new AttachmentView
         {
             DataContext = attachmentViewModel
         };
         InkableScene.Add(attachmentView);
     }
 }
        public void AttachmentViewInits()
        {
            var viewId = "viewId";
            var size   = 5;

            var attachmentView = new AttachmentView(viewId, size);

            Assert.NotNull(attachmentView);
            Assert.Equal(viewId, attachmentView.ViewId);
            Assert.Equal(size, attachmentView.Size);
        }
Exemplo n.º 3
0
        public async Task DownloadAndDecryptAttachmentAsync_RequestsTimeLimitedUrl(SutProvider <CipherService> sutProvider,
                                                                                   string cipherId, AttachmentView attachment, AttachmentResponse response)
        {
            sutProvider.GetDependency <IApiService>().GetAttachmentData(cipherId, attachment.Id)
            .Returns(response);

            await sutProvider.Sut.DownloadAndDecryptAttachmentAsync(cipherId, attachment, null);

            await sutProvider.GetDependency <IApiService>().Received(1).GetAttachmentData(cipherId, attachment.Id);
        }