001/*
002 * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games.
003 * Copyright (C) 2000-2010 The Gridarta Developers.
004 *
005 * This program is free software; you can redistribute it and/or modify
006 * it under the terms of the GNU General Public License as published by
007 * the Free Software Foundation; either version 2 of the License, or
008 * (at your option) any later version.
009 *
010 * This program is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
013 * GNU General Public License for more details.
014 *
015 * You should have received a copy of the GNU General Public License along
016 * with this program; if not, write to the Free Software Foundation, Inc.,
017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
018 */
019
020package net.sf.gridarta.model.settings;
021
022import java.io.File;
023import org.jetbrains.annotations.NotNull;
024
025/**
026 * An {@link ProjectSettings} implementation for testing purposes.
027 * @author Andreas Kirschbaum
028 */
029public class TestProjectSettings extends AbstractProjectSettings {
030
031    /**
032     * The maps directory.
033     */
034    @NotNull
035    private File mapsDirectory = new File("maps");
036
037    /**
038     * {@inheritDoc}
039     */
040    @NotNull
041    @Override
042    public File getArchDirectory() {
043        return new File("arch");
044    }
045
046    /**
047     * {@inheritDoc}
048     */
049    @Override
050    public void setArchDirectory(@NotNull final File archDirectory) {
051        throw new AssertionError();
052    }
053
054    /**
055     * {@inheritDoc}
056     */
057    @NotNull
058    @Override
059    public File getMapsDirectory() {
060        return mapsDirectory;
061    }
062
063    /**
064     * {@inheritDoc}
065     */
066    @Override
067    public void setMapsDirectory(@NotNull final File mapsDirectory) {
068        if (this.mapsDirectory.equals(mapsDirectory)) {
069            return;
070        }
071
072        this.mapsDirectory = mapsDirectory;
073        fireMapsDirectoryChanged();
074    }
075
076    /**
077     * {@inheritDoc}
078     */
079    @NotNull
080    @Override
081    public String getConfigSourceName() {
082        throw new AssertionError();
083    }
084
085    /**
086     * {@inheritDoc}
087     */
088    @Override
089    public void setConfigSourceName(@NotNull final String configSourceName) {
090        throw new AssertionError();
091    }
092
093    /**
094     * {@inheritDoc}
095     */
096    @Override
097    @NotNull
098    public File getPickmapDir() {
099        throw new AssertionError();
100    }
101
102    /**
103     * {@inheritDoc}
104     */
105    @Override
106    @NotNull
107    public File getMediaDirectory() {
108        throw new AssertionError();
109    }
110
111    /**
112     * {@inheritDoc}
113     */
114    @Override
115    public void setMediaDirectory(@NotNull final File mediaDirectory) {
116        throw new AssertionError();
117    }
118
119    /**
120     * {@inheritDoc}
121     */
122    @NotNull
123    @Override
124    public String getImageSet() {
125        throw new AssertionError();
126    }
127
128    @Override
129    public void setImageSet(@NotNull final String imageSet) {
130        throw new AssertionError();
131    }
132
133    /**
134     * {@inheritDoc}
135     */
136    @Override
137    @NotNull
138    public File getConfigurationDirectory() {
139        throw new AssertionError();
140    }
141
142    /**
143     * {@inheritDoc}
144     */
145    @Override
146    @NotNull
147    public File getCollectedDirectory() {
148        return new File("collected");
149    }
150
151    /**
152     * {@inheritDoc}
153     */
154    @NotNull
155    @Override
156    public String getUserName() {
157        return "user";
158    }
159
160    /**
161     * {@inheritDoc}
162     */
163    @Override
164    public void setUserName(@NotNull final String userName) {
165        throw new AssertionError();
166    }
167
168    /**
169     * {@inheritDoc}
170     */
171    @Override
172    public boolean saveIndices() {
173        return false;
174    }
175
176}