Skip to content

Commit 0c2e33a

Browse files
committed
Add integration test for presentation saved in OneDrive and with Auto Save feature enabled
1 parent a731860 commit 0c2e33a

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Source/NetOffice.Tests/PowerPointApi/PresentationTests.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,38 @@ public void AutoSaveOn_PresentationSavedLocally_FeatureAutoSaveIsOff_ReturnsFals
3838

3939
// Assert
4040
Assert.IsFalse(actualValue);
41+
42+
// Cleanup
43+
presentation.Close();
44+
}
45+
46+
[Test]
47+
public void AutoSaveOn_PresentationSavedInOneDrive_FeatureAutoSaveIsOn_ReturnsTrue()
48+
{
49+
// Arrange
50+
var presentation = PowerPointApp.Presentations.Open(this.Docs.AutoSaveOn_PresentationSavedInOneDrive_FeatureAutoSaveIsOn, false);
51+
52+
// Act
53+
var actualValue = presentation.AutoSaveOn;
54+
55+
// Assert
56+
Assert.IsTrue(actualValue);
57+
58+
// Cleanup
59+
presentation.Close();
4160
}
4261

4362
public class Documents
4463
{
4564
public string AutoSaveOn_PresentationSavedLocally_FeatureAutoSaveIsOff { get; set; }
65+
public string AutoSaveOn_PresentationSavedInOneDrive_FeatureAutoSaveIsOn { get; set; }
4666

4767
public Documents(TestContext context)
4868
{
4969
this.AutoSaveOn_PresentationSavedLocally_FeatureAutoSaveIsOff = Path.Combine(context.TestDirectory, @"PowerPointApi\Docs", "AutoSaveOn_PresentationSavedLocally_FeatureAutoSaveIsOff.pptx");
70+
71+
// Public link: https://1drv.ms/p/c/8cd14a64b99957bc/EVX1bUNmBtxDvfvg-aNQjKkBX35RJ3BJ6_2ey2Ox5gnIfA?e=DVyExX
72+
this.AutoSaveOn_PresentationSavedInOneDrive_FeatureAutoSaveIsOn = @"https://d.docs.live.net/8CD14A64B99957BC/Developer/NetOfficeFw/PowerPoint/AutoSaveOn_PresentationSavedInOneDrive_FeatureAutoSaveIsOn.pptx";
5073
}
5174
}
5275
}

0 commit comments

Comments
 (0)