"use strict";

var _index = require("./index");

var _testUtils = require("../utils/test-utils");

describe('Longitude Tests', function () {
  var model = {
    longitude: _index.Longitude
  };
  test('Longitude is a number that can have a decimal, be negative or positive', function () {
    expect((0, _testUtils.propTypeErrors)(model, {
      longitude: 50.3
    })).toBeFalsy();
    expect((0, _testUtils.propTypeErrors)(model, {
      longitude: 30
    })).toBeFalsy();
    expect((0, _testUtils.propTypeErrors)(model, {
      longitude: -24.0
    })).toBeFalsy();
    expect((0, _testUtils.propTypeErrors)(model, {
      longitude: '50.30'
    })).toBeTruthy();
    expect((0, _testUtils.propTypeErrors)(model, {
      longitude: '30'
    })).toBeTruthy();
    expect((0, _testUtils.propTypeErrors)(model, {
      longitude: '-24.00'
    })).toBeTruthy();
  });
  test('Maximum Longitude is 180.00', function () {
    expect((0, _testUtils.propTypeErrors)(model, {
      longitude: 180.0
    })).toBeFalsy();
    expect((0, _testUtils.propTypeErrors)(model, {
      longitude: 180.01
    })).toBeTruthy();
    expect((0, _testUtils.propTypeErrors)(model, {
      longitude: 181.0
    })).toBeTruthy();
  });
  test('Minimum Longitude is -180.00', function () {
    expect((0, _testUtils.propTypeErrors)(model, {
      longitude: -180.0
    })).toBeFalsy();
    expect((0, _testUtils.propTypeErrors)(model, {
      longitude: -180.01
    })).toBeTruthy();
    expect((0, _testUtils.propTypeErrors)(model, {
      longitude: -181.0
    })).toBeTruthy();
  });
});