message: Fill out ImmutableMap tests
diff: @@ -11,6 +11,8 @@ module('ImmutableMap', function() {
  test('records can be added and removed', function(assert) {
  let map = new ImmutableMap<string, object>();
  + assert.equal(map.size, 0, 'size matches expectations');
  +
  assert.equal(map.has('jupiter'), false, 'map does not have record');
  assert.strictEqual(map.get('jupiter'), undefined, 'get returns undefined');
  @@ -28,7 +30,48 @@ module('ImmutableMap', function() {
  let pluto = { type: 'planet', id: 'pluto', attributes: { name: 'Pluto' }};
  map.set('pluto', pluto);
  + assert.equal(map.size, 2, 'size matches expectations');
  assert.deepEqual(Array.from(map.keys()), ['pluto', 'jupiter'], 'keys match expectations');
  assert.deepEqual(Array.from(map.values()), [pluto, jupiter2], 'values match expectations');
  +
  + map.remove('jupiter');
  + map.remove('pluto');
  +
  + assert.equal(map.size, 0, 'size matches expectations');
  + });
  +
  + test('maps can be instantiated based on other maps and their contents will be equal (but then will diverge)', function(assert) {
  + let map = new ImmutableMap<string, object>();
  +
  + let jupiter = { type: 'planet', id: 'jupiter', attributes: { name: 'Jupiter' }};
  + map.set('jupiter', jupiter);
  +
  + assert.strictEqual(map.get('jupiter'), jupiter, 'record matches expectations');
  +
  + // create a new map based on the original
  + let map2 = new ImmutableMap<string, object>(map);
  +
  + assert.strictEqual(map2.get('jupiter'), jupiter, 'record matches expectations');
  +
  + let jupiter2 = { type: 'planet', id: 'jupiter', attributes: { name: 'Jupiter2' }};
  + map2.set('jupiter', jupiter2);
  +
  + let pluto = { type: 'planet', id: 'pluto', attributes: { name: 'Pluto' }};
  + map2.set('pluto', pluto);
  +
  + assert.equal(map.size, 1, 'original map still has one member');
  + assert.strictEqual(map.get('jupiter'), jupiter, 'original map is unchanged');
  +
  + assert.equal(map2.size, 2, 'new map now has two members');
  + assert.strictEqual(map2.get('jupiter'), jupiter2, 'replacement record matches expectations');
  + assert.strictEqual(map2.get('pluto'), pluto, 'new record matches expectations');
  +
  + map2.remove('jupiter');
  + map2.remove('pluto');
  +
  + assert.equal(map2.size, 0, 'size matches expectations');
  +
  + assert.equal(map.size, 1, 'original map still has one member');
  + assert.strictEqual(map.get('jupiter'), jupiter, 'original map is unchanged');
  });
  });
  