mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
25 lines
620 B
C#
25 lines
620 B
C#
|
|
// Copyright (c) Microsoft Corporation
|
||
|
|
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||
|
|
// See the LICENSE file in the project root for more information.
|
||
|
|
namespace Microsoft.CmdPal.Ext.Bookmarks.UnitTests;
|
||
|
|
|
||
|
|
internal sealed class MockBookmarkDataSource : IBookmarkDataSource
|
||
|
|
{
|
||
|
|
private string _jsonData;
|
||
|
|
|
||
|
|
public MockBookmarkDataSource(string initialJsonData = "[]")
|
||
|
|
{
|
||
|
|
_jsonData = initialJsonData;
|
||
|
|
}
|
||
|
|
|
||
|
|
public string GetBookmarkData()
|
||
|
|
{
|
||
|
|
return _jsonData;
|
||
|
|
}
|
||
|
|
|
||
|
|
public void SaveBookmarkData(string jsonData)
|
||
|
|
{
|
||
|
|
_jsonData = jsonData;
|
||
|
|
}
|
||
|
|
}
|