コード例 #1
0
		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);
		}
コード例 #2
0
        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);
        }
コード例 #3
0
		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);
		}
コード例 #4
0
        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);
        }
コード例 #5
0
		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);
		}
コード例 #6
0
        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);
        }