message: Tested param blank encode
diff: @@ -4363,7 +4363,7 @@ describe('MatchTest', function () {
  ]);
  var state = stateNavigator.states['s'];
  state.urlEncode = (state, key, val) => val === 'cd' ? '' : val
  - state.urlDecode = (state, key, val) => !val ? 'cd' : val
  + state.urlDecode = (state, key, val) => val === ''? 'cd' : val
  });
  it('should match', function() {
  @@ -4387,7 +4387,7 @@ describe('MatchTest', function () {
  ]);
  var state = stateNavigator.states['s'];
  state.urlEncode = (state, key, val) => val === 'cd' ? null : val
  - state.urlDecode = (state, key, val) => !val ? 'cd' : val
  + state.urlDecode = (state, key, val) => val === ''? 'cd' : val
  });
  it('should match', function() {
  @@ -4535,7 +4535,36 @@ describe('MatchTest', function () {
  assert.strictEqual(stateNavigator.getNavigationLink('s', { x: true }), '/ab?x');
  assert.strictEqual(stateNavigator.getNavigationLink('s', { x: false }), '/ab');
  assert.strictEqual(stateNavigator.getNavigationLink('s', { x: true, y: 'cd' }), '/ab?x&y=cd');
  - assert.strictEqual(stateNavigator.getNavigationLink('s', { x: false, y: 'cd' }), '/ab?x&y=cd');
  + assert.strictEqual(stateNavigator.getNavigationLink('s', { x: false, y: 'cd' }), '/ab?y=cd');
  + });
  + });
  +
  + describe('Param Blank Encode', function () {
  + var stateNavigator: StateNavigator;
  + beforeEach(function () {
  + stateNavigator = new StateNavigator([
  + { key: 's', route: '{x}' }
  + ]);
  + var state = stateNavigator.states['s'];
  + state.urlEncode = (state, key, val) => val === 'cd' ? '' : val
  + state.urlDecode = (state, key, val) => val === '' ? 'cd' : val
  + });
  +
  + it('should match', function() {
  + var { data } = stateNavigator.parseLink('/efg');
  + assert.strictEqual(data.x, 'efg');
  + });
  +
  + it('should not match', function() {
  + assert.throws(() => stateNavigator.parseLink('/'), /The Url .+ is invalid/);
  + });
  +
  + it('should build', function() {
  + assert.strictEqual(stateNavigator.getNavigationLink('s', { x: 'efg' }), '/efg');
  + });
  +
  + it('should not build', function() {
  + assert.strictEqual(stateNavigator.getNavigationLink('s', { x: 'cd' }), null);
  });
  });
  