Ejemplo n.º 1
0
        public void InsertTest()
        {
            TestUtils.Security.SetCurrentUser(TestEnums.User.constDoctorID);

            var AppFile = AppFileServiceTest.CreateNewAppFile();
            var target  = AppFileEN.GetService("");

            target.Insert(AppFile, new InsertParameters());
            // Happy scenario without exception
        }
Ejemplo n.º 2
0
        public void GetFileKeyTest()
        {
            var            AppFile             = AppFileServiceTest.CreateNewAppFile();
            AppFileService target              = (AppFileService)AppFileEN.GetService("");
            string         recordId            = "123123";
            string         virtualPathTemplate = "userfiles/u{userid}/visitattach/{recordid}/{filename}";
            string         selectedfileName    = "myfile.zip";
            long           userId              = 100000001;
            string         expected            = "userfiles/u100000001/visitattach/123123/myfile.zip";
            string         actual              = target.GetFileKeyByPathTemplate(virtualPathTemplate, selectedfileName, userId, recordId);

            Assert.AreEqual(expected, actual);
        }