public void GetApplicationSettingsReturnsDictionaryFromIsolatedStorageSettings()
        {
            var platform = new PlatformImplementation();

            IDictionary <string, object> settings = platform.GetApplicationSettings();

            Assert.NotNull(settings);
            Assert.Same(IsolatedStorageSettings.ApplicationSettings, settings);
        }
        public void GetApplicationSettingsReturnsDictionaryFromLocalSettingsOfApplicationData()
        {
            string testKey = Guid.NewGuid().ToString();
            string testValue = Guid.NewGuid().ToString();
            ApplicationData.Current.LocalSettings.Values[testKey] = testValue;
            try
            {
                var platform = new PlatformImplementation();
                IDictionary<string, object> settings = platform.GetApplicationSettings();

                // Can't use object reference equality here because ApplicationData.Current.LocalSettings.Values returns a new instance every time
                Assert.Equal(testValue, settings[testKey]);
            }
            finally
            {
                ApplicationData.Current.LocalSettings.Values.Remove(testKey);
            }
        }
        public void GetApplicationSettingsReturnsDictionaryFromLocalSettingsOfApplicationData()
        {
            string testKey   = Guid.NewGuid().ToString();
            string testValue = Guid.NewGuid().ToString();

            ApplicationData.Current.LocalSettings.Values[testKey] = testValue;
            try
            {
                var platform = new PlatformImplementation();
                IDictionary <string, object> settings = platform.GetApplicationSettings();

                // Can't use object reference equality here because ApplicationData.Current.LocalSettings.Values returns a new instance every time
                Assert.Equal(testValue, settings[testKey]);
            }
            finally
            {
                ApplicationData.Current.LocalSettings.Values.Remove(testKey);
            }
        }