*
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#include <catch.hpp>

#include <actions/addinstrument.h>
#include <score/score.h>

TEST_CASE("Actions/AddInstrument", "")
{
    Score score;
    Instrument instrument;
    instrument.setDescription("Test");

    AddInstrument action(score, instrument);

    action.redo();
    REQUIRE(score.getInstruments().size() == 1);
    REQUIRE(score.getInstruments()[0] == instrument);

    action.undo();
    REQUIRE(score.getInstruments().size() == 0);
}