示例#1
0
        public void CreateNewDropboxUpload_GivenInvalidThenExecute_ShouldReturnFailureResult()
        {
            //---------------Set up test pack-------------------
            var dropBoxUpload = new DropBoxUpload(null, "", "random.txt");

            //---------------Assert Precondition----------------
            Assert.IsNotNull(dropBoxUpload);
            //---------------Execute Test ----------------------
            var metadata = dropBoxUpload.ExecuteTask(It.IsAny <IDropboxClientWrapper>());

            //---------------Test Result -----------------------
            Assert.IsNotNull(metadata);
            Assert.IsInstanceOfType(metadata, typeof(DropboxFailureResult));
        }
        public void DropBoxUpload_ExecuteTask_IsDropboxFailureResult_ExpectTrue()
        {
            //---------------Set up test pack-------------------
            var dropBoxUpload = new DropBoxUpload(false, "", "random.txt");

            //---------------Assert Precondition----------------
            Assert.IsNotNull(dropBoxUpload);
            //---------------Execute Test ----------------------
            var metadata = dropBoxUpload.ExecuteTask(It.IsAny <IDropboxClient>());

            //---------------Test Result -----------------------
            Assert.IsNotNull(metadata);
            Assert.IsInstanceOfType(metadata, typeof(DropboxFailureResult));
        }