public void Load_WhenPathIsNull_Throws() { IFileBackingStore test = BuildDefaultFileBackingStoreService(); test.Path = null; Assert.Throws(typeof(InvalidOperationException), () => test.Load()); }
public void Save_WithoutSettingPath_UsesPathFromLocator() { using (var memoryStream = new MemoryStream()) { _mockLocator.Setup(locator => locator.Path).Returns(ExamplePath); _mockStreamService.Setup(stream => stream.GetWriteStream(ExamplePath)).Returns(memoryStream).Verifiable(); IFileBackingStore test = BuildDefaultFileBackingStoreService(); test.Save(); _mockStreamService.Verify(); } }