Esempio n. 1
0
        public void CommonTest()
        {
            string profileTestsDir = "ProfileTests";

            if (Directory.Exists(profileTestsDir))
                Directory.Delete(profileTestsDir);

            Directory.CreateDirectory(profileTestsDir);

            ProfileManager manager = new ProfileManager(profileTestsDir);

            manager.SaveProfile(CreateFakeProfile("cyclops"));
            manager.SaveProfile(CreateFakeProfile("2"));
            manager.SaveProfile(CreateFakeProfile("3"));

            var profiles = manager.GetSavedProfiles().ToArray();

            Assert.AreEqual(3, profiles.Count());
            Assert.AreEqual("1", manager.GetSavedProfiles().OrderBy(i => i.Name).First().ConnectionConfig.
                                DecodePassword());

            manager.GetSavedProfiles().ForEach(manager.RemoveProfile);
        }
Esempio n. 2
0
 static ProfileManager()
 {
     DefaultInstance = new ProfileManager(ConfigurationManager.AppSettings["ProfilesFolder"]);
 }