public void SharedFileStatusTest_NoModel()
        {
            var sharedFileVm = new SharedFileViewModel();

            sharedFileVm.Initialize(viewModelFactory);
            Assert.AreEqual(SharedFileState.Error, sharedFileVm.State);
        }
        public void SharedFileStatusTest_ConvertedButNotShared()
        {
            var sharedFile = new SharedFile()
            {
                SharedFileId = Guid.NewGuid(), ConvertedFileLocation = "http://localhost"
            };
            var sharedFileVm = new SharedFileViewModel();

            sharedFileVm.Initialize(viewModelFactory);
            sharedFileVm.Model = sharedFile;
            Assert.AreEqual(SharedFileState.ReadyToShare, sharedFileVm.State);
        }
        public void SharedFileStatusTest_NoFileUploadController()
        {
            var sharedFile = new SharedFile()
            {
                SharedFileId = Guid.NewGuid()
            };
            var sharedFileVm = new SharedFileViewModel();

            sharedFileVm.Initialize(viewModelFactory);
            sharedFileVm.Model = sharedFile;
            Assert.AreEqual(SharedFileState.Error, sharedFileVm.State);
        }
        public void SharedFileStatusTest_Uploaded()
        {
            var sharedFile = new SharedFile()
            {
                SharedFileId = Guid.NewGuid()
            };
            var sharedFileVm = new SharedFileViewModel();

            sharedFileVm.Initialize(viewModelFactory);
            sharedFileVm.Model = sharedFile;
            sharedFileVm.FileUploadController             = new FileUploadController(null, null, null);
            sharedFileVm.FileUploadController.UploadState = UploadState.Finished;
            Assert.AreEqual(SharedFileState.Converting, sharedFileVm.State);
        }
        public void SharedFileStatusTest_Pending()
        {
            var sharedFile = new SharedFile()
            {
                SharedFileId = Guid.NewGuid()
            };
            var sharedFileVm = new SharedFileViewModel();

            sharedFileVm.Initialize(viewModelFactory);
            sharedFileVm.Model = sharedFile;
            sharedFileVm.FileUploadController             = new FileUploadController(null, null, null);
            sharedFileVm.FileUploadController.UploadState = UploadState.Pending;
            Assert.AreEqual(SharedFileState.ReadyToUpload, sharedFileVm.State);
        }