{"size": 1337, "ext": "js", "max_stars_repo_path": "backend/test/entities/battleLand.Spec.js", "max_stars_repo_name": "healqq/manacheck", "max_stars_repo_stars_event_min_datetime": "2017-03-27T08:42:49.000Z", "max_stars_repo_stars_event_max_datetime": "2018-10-08T14:16:53.000Z", "max_issues_repo_path": "backend/test/entities/battleLand.Spec.js", "max_issues_repo_name": "healqq/manacheck", "max_issues_repo_issues_event_min_datetime": "2017-03-04T09:11:09.000Z", "max_issues_repo_issues_event_max_datetime": "2017-03-04T09:11:09.000Z", "max_forks_repo_path": "backend/test/entities/battleLand.Spec.js", "max_forks_repo_name": "healqq/manacheck", "max_forks_repo_forks_event_min_datetime": "2017-06-02T06:06:40.000Z", "max_forks_repo_forks_event_max_datetime": "2018-04-11T02:09:19.000Z"}
{"max_stars_count": 2, "max_issues_count": 1, "max_forks_count": 2, "avg_line_length": 33.425, "max_line_length": 87, "alphanum_fraction": 0.6065818998}
var unitTestHelper = require("../util/unitTestHelper.js");

var expect = require("chai").expect;
var BattleLand, Field, gameStateService;

describe("BattleLand", function(){
    before(function (){
        unitTestHelper.setGlobalVars();
        BattleLand = require(cardsModule + "/entities/BattleLand.js");
        Field = require(cardsModule + '/services/fieldService.js');
        gameStateService = require(cardsModule + '/services/gameStateService.js');
    });
   	describe(".isTapped()", function() {
        it("should be tapped if field has less than two basics", function(){

        	var field = new Field();
            var gameState = new gameStateService(undefined, undefined, field);

        	field.addLand({type:'battle'});
            field.addLand({type:'basic'});

            var newLand = new BattleLand(5, [], gameState);
        	expect(newLand.isTapped()).equal(true);
        })

        it("should be untapped if field has more or equal than two basics", function(){

            var field = new Field();
            var gameState = new gameStateService(undefined, undefined, field);

            field.addLand({type:'basic'});
            field.addLand({type:'basic'});

            var newLand = new BattleLand(5, [], gameState);
            expect(newLand.isTapped()).equal(false);
        })
    });


});