mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Added some tests
Removed false first group, replaced it a button in the header Code refactor
This commit is contained in:
@@ -50,7 +50,7 @@ namespace ModernKeePassApp.Test.Mock
|
||||
|
||||
public void Save()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
// Do Nothing
|
||||
}
|
||||
|
||||
public void Save(StorageFile file)
|
||||
|
31
ModernKeePassApp.Test/Mock/LicenseServiceMock.cs
Normal file
31
ModernKeePassApp.Test/Mock/LicenseServiceMock.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Windows.ApplicationModel;
|
||||
using Windows.ApplicationModel.Store;
|
||||
using ModernKeePass.Interfaces;
|
||||
|
||||
namespace ModernKeePassApp.Test.Mock
|
||||
{
|
||||
public class LicenseServiceMock: ILicenseService
|
||||
{
|
||||
public IReadOnlyDictionary<string, ProductListing> Products { get; }
|
||||
|
||||
public LicenseServiceMock()
|
||||
{
|
||||
try
|
||||
{
|
||||
var proxyFile = Package.Current.InstalledLocation.GetFileAsync("data\\WindowsStoreProxy.xml").GetAwaiter().GetResult();
|
||||
CurrentAppSimulator.ReloadSimulatorAsync(proxyFile).GetAwaiter().GetResult();
|
||||
}
|
||||
catch { }
|
||||
var listing = CurrentAppSimulator.LoadListingInformationAsync().GetAwaiter().GetResult();
|
||||
Products = listing.ProductListings;
|
||||
}
|
||||
|
||||
public Task<int> Purchase(string addOn)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user