Пример #1
0
        public void RemoveNonExistingProfile()
        {
            var fakeProfile         = "Some fake profile";
            var fakeProfileSettings = Path.Combine(SolutionSettings, fakeProfile);

            using (mocks.Record())
            {
                // we already have default settings
                Expect.Call(store.CollectionExists(SolutionSettings)).Return(true);
                // validation
                Expect.Call(store.CollectionExists(fakeProfileSettings)).Return(false);
            }

            using (mocks.Playback())
            {
                var settings = new VsSettingsManager(SolutionId, store);
                settings.RemoveProfile(fakeProfile);
            }
        }
Пример #2
0
        public void RemoveProfileTest()
        {
            var defaultProfileSettings = Path.Combine(SolutionSettings, DefaultProfileName);

            using (mocks.Record())
            {
                // we already have default settings
                Expect.Call(store.CollectionExists(SolutionSettings)).Return(true);
                // validation
                Expect.Call(store.CollectionExists(defaultProfileSettings)).Return(true);
                // actual delete
                Expect.Call(store.DeleteCollection(defaultProfileSettings)).Return(true);
            }

            using (mocks.Playback())
            {
                var settings = new VsSettingsManager(SolutionId, store);
                settings.RemoveProfile(DefaultProfileName);
            }
        }
        public void RemoveProfileTest()
        {
            var defaultProfileSettings = Path.Combine(SolutionSettings, DefaultProfileName);

            using (mocks.Record())
            {
                // we already have default settings
                Expect.Call(store.CollectionExists(SolutionSettings)).Return(true);
                // validation
                Expect.Call(store.CollectionExists(defaultProfileSettings)).Return(true);
                // actual delete
                Expect.Call(store.DeleteCollection(defaultProfileSettings)).Return(true);
            }

            using (mocks.Playback())
            {
                var settings = new VsSettingsManager(SolutionId, store);
                settings.RemoveProfile(DefaultProfileName);
            }
        }
        public void RemoveNonExistingProfile()
        {
            var fakeProfile = "Some fake profile";
            var fakeProfileSettings = Path.Combine(SolutionSettings, fakeProfile);

            using (mocks.Record())
            {
                // we already have default settings
                Expect.Call(store.CollectionExists(SolutionSettings)).Return(true);
                // validation
                Expect.Call(store.CollectionExists(fakeProfileSettings)).Return(false);
            }

            using (mocks.Playback())
            {
                var settings = new VsSettingsManager(SolutionId, store);
                settings.RemoveProfile(fakeProfile);
            }
        }