public void AppSwitchUser_SwitchesCurrentUser()
        {
            var first  = GetFakeUser();
            var second = GetFakeUser();

            Assert.That(DefaultApp.CurrentUser, Is.EqualTo(second));

            DefaultApp.SwitchUser(first);

            Assert.That(DefaultApp.CurrentUser, Is.EqualTo(first));
        }
        public void AppSwitchUser_WhenUserIsCurrent_DoesNothing()
        {
            var first = GetFakeUser();

            Assert.That(DefaultApp.CurrentUser, Is.EqualTo(first));

            var second = GetFakeUser();

            Assert.That(DefaultApp.CurrentUser, Is.EqualTo(second));

            DefaultApp.SwitchUser(second);

            Assert.That(DefaultApp.CurrentUser, Is.EqualTo(second));
        }
 public void AppSwitchUser_WhenUserIsNull_Throws()
 {
     Assert.That(() => DefaultApp.SwitchUser(null), Throws.InstanceOf <ArgumentNullException>());
 }