Ejemplo n.º 1
0
 public void TestInitialize()
 {
     string fileName = "test.pptx";
     correctFileName = CommonTest.GetFileResourcePath(fileName);
     
     powerPointControl = new PowerPointControl();
     powerPointControl.PreparePresentation(correctFileName);
     powerPointControl.StartPresentation();
 }
 public void prepareNotExistentPresentationTest()
 {
     PowerPointControl target = new PowerPointControl(); 
     string fileName = "wrondfile.dd"; 
     try
     {
         target.PreparePresentation(fileName);
         Assert.Fail("No exception was throw with a wrong name");
     }
     catch (Exception e)
     {
         Assert.IsTrue(true, "Exeption was throw " + e.Message );
     }
 }
        public void prepareCorrectPresentationTest()
        {
            PowerPointControl target = new PowerPointControl(); 
            string fileName = correctFileName; 

            try
            {
                target.PreparePresentation(fileName);
                Assert.IsTrue(true);
            }
            catch(Exception e)
            {
                Assert.Fail("Exeption" + e.Message);
            }

        }
        public void closePresentationTest()
        {
            PowerPointControl target = new PowerPointControl(); // TODO: Initialize to an appropriate value

            target.PreparePresentation(correctFileName);
            target.StartPresentation();

            try
            {
                target.ClosePresentation();
                Assert.IsTrue(true, "Presentation was closed with no exception");
            }
            catch(Exception e)
            {
                Assert.Fail("Exception : " + e.Message); 
            }

        }