Пример #1
0
        public void CommentEx04VerifyDelete()
        {
            using (var stream = new MemoryStream())
            {
                GeneratedDocument.Generate(stream);

                TestEntities.DeleteElements(stream);
                TestEntities.VerifyDeletedElements(stream);
            }
        }
Пример #2
0
        public void CommentEx02VerifyEdit()
        {
            using (var stream = new MemoryStream())
            {
                GeneratedDocument.Generate(stream);

                TestEntities.EditElements(stream);
                TestEntities.VerifyElements(stream);
            }
        }
Пример #3
0
        public void CommentEx02VerifyEdit()
        {
            this.MyTestInitialize(TestContext.GetCurrentMethod());

            string originalFilepath = this.GetTestFilePath(this.generatedDocumentFilePath);
            string editFilePath     = this.GetTestFilePath(this.editedDocumentFilePath);

            System.IO.File.Copy(originalFilepath, editFilePath, true);

            TestEntities testEntities = new TestEntities();

            testEntities.EditElements(editFilePath, this.Log);
            testEntities.VerifyElements(editFilePath, this.Log);
        }
Пример #4
0
        public void CommentEx04VerifyDelete()
        {
            this.MyTestInitialize(TestContext.GetCurrentMethod());

            string originalFilepath = this.GetTestFilePath(this.generatedDocumentFilePath);
            string deleteFilePath   = this.GetTestFilePath(this.deleteDocumentFilePath);

            System.IO.File.Copy(originalFilepath, deleteFilePath, true);

            TestEntities testEntities = new TestEntities();

            testEntities.DeleteElements(deleteFilePath, this.Log);
            testEntities.VerifyDeletedElements(deleteFilePath, this.Log);
        }
Пример #5
0
        public void CommentEx04VerifyDelete()
        {
            this.MyTestInitialize(TestContext.GetCurrentMethod());
            try
            {
                string originalFilepath = this.GetTestFilePath(this.generatedDocumentFilePath);
                string deleteFilePath = this.GetTestFilePath(this.deleteDocumentFilePath);

                System.IO.File.Copy(originalFilepath, deleteFilePath, true);

                TestEntities testEntities = new TestEntities();
                testEntities.DeleteElements(deleteFilePath, this.Log);
                testEntities.VerifyDeletedElements(deleteFilePath, this.Log);
            }
            catch (Exception e)
            {
                this.Log.Fail(e.Message);
            }
        }