Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
            }
        }