Changeset 9527 in josm for trunk/test


Ignore:
Timestamp:
2016-01-18T20:08:51+01:00 (4 years ago)
Author:
simon04
Message:

fix #10306 - Changeset manager does not know username of current uploaded and open changeset

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/JosmUserIdentityManagerTest.groovy

    r8510 r9527  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.gui;
     2package org.openstreetmap.josm.gui
     3
     4import org.openstreetmap.josm.data.osm.User;
    35
    46import static org.junit.Assert.*
     
    5052        assert im.getUserName() == null
    5153        assert im.getUserInfo() == null
     54        assert im.asUser() == User.anonymous
    5255    }
    5356
     
    7982        assert im.getUserName() == "test"
    8083        assert im.getUserInfo() == null
     84        assert im.asUser() == new User(0, "test")
    8185    }
    8286
     
    112116        assert im.getUserName() == "test"
    113117        assert im.getUserInfo() == userInfo
     118        assert im.asUser() == new User(1, "test")
    114119    }
    115120
     
    285290        Main.pref.put "osm-server.username", null
    286291        assert im.isAnonymous()
     292        assert im.asUser() == User.anonymous
    287293
    288294        // reset it
     
    293299        assert im.isPartiallyIdentified()
    294300        assert im.getUserName() == "test2"
     301        assert im.asUser() == new User(0, "test2")
    295302
    296303        Main.pref.put "osm-server.username", null
     
    304311        assert im.isPartiallyIdentified()
    305312        assert im.getUserName() == "test2"
     313        assert im.asUser() == new User(0, "test2")
    306314
    307315        // reset it
Note: See TracChangeset for help on using the changeset viewer.