public void SavingAnAppMustBePlatformDependent() { var appsStorage = new AppsStorage(settings); const string AppName = "MyCoolApp"; appsStorage.AddApp(GetMockAppInfo(AppName, PlatformName.Android)); Assert.AreEqual(1, appsStorage.AvailableApps.Length); appsStorage.AddApp(GetMockAppInfo(AppName, PlatformName.Web)); Assert.AreEqual(2, appsStorage.AvailableApps.Length); }
public void SavingAnAppSecondTimeShouldJustUpdateItInStorage() { var appsStorage = new AppsStorage(settings); const string AppName = "MyCoolApp"; appsStorage.AddApp(GetMockAppInfo(AppName)); appsStorage.AddApp(GetMockAppInfo(AppName)); Assert.AreEqual(1, appsStorage.AvailableApps.Length); var loadedAppsStorage = new AppsStorage(settings); Assert.AreEqual(appsStorage.AvailableApps.Length, loadedAppsStorage.AvailableApps.Length); }
public void LoadStorageFromSettings() { var appsStorage = new AppsStorage(settings); appsStorage.AddApp(GetMockAppInfo("EmptyApp")); Assert.AreEqual(1, appsStorage.AvailableApps.Length); var loadedAppsStorage = new AppsStorage(settings); Assert.AreEqual(appsStorage.AvailableApps.Length, loadedAppsStorage.AvailableApps.Length); }