public void CCHDocumentRepository_Create()
 {
     var contactID = 1323;
     var centralDAL = new DAL("0");
     var docManager = new DocManager(centralDAL);
     var sut = new CCHDocumentRepository(docManager, contactID);
 }
 public void CCHDocumentRepository_Upload()
 {
     string path = @"C:\scratch\Cloud-Readiness-v012.docx";
     var contactID = 1323;
     var centralDAL = new DAL("0");
     var docManager = new DocManager(centralDAL);
     var sut = new CCHDocumentRepository(docManager, contactID);
     sut.UploadDocument(path);
 }
 public void CCHDocumentRepository_GetDocuments()
 {
     var contactID = 1323;
     var centralDAL = new DAL("0");
     var docManager = new DocManager(centralDAL);
     var sut = new CCHDocumentRepository(docManager, contactID);
     var docs = sut.GetDocuments();
     Assert.AreNotEqual(0, docs.Count());
 }
        public void CCHDocumentRepository_Download()
        {
            string path = @"C:\scratch";
            var contactID = 1323;
            var centralDAL = new DAL("0");
            var docManager = new DocManager(centralDAL);
            var sut = new CCHDocumentRepository(docManager, contactID);
            var docs = sut.GetDocuments();
            Assert.AreNotEqual(0, docs.Count());

            int documentID = docs.First().DocumentID;
            sut.DownloadDocument(documentID, path);
        }
示例#5
0
        public void LoadClient(int ClientId, ICSSHost Host)
        {
            // construct APIs
            var centralDal = CssContext.Instance.GetDAL(string.Empty) as DAL;
            var docManager = new DocManager(centralDal);
            var centralGateway = new CentralGateway(centralDal);
            var client = centralGateway.FindClient(ClientId, CssContext.Instance.Host.EmployeeId);

            client.Assignments.Add(new Assignment() {

            });

            _contactID = client.Contact.ContactId;

            _documentRepo = new CCHDocumentRepository(docManager, client.Contact.ContactId);
            RefreshData();
        }