示例#1
0
        public void ChangePasswordChanges()
        {
            MockedDummyProfileScreenSettingsService _mockedDummy = new MockedDummyProfileScreenSettingsService();
            IProfileScreen     _profileScreen          = new MockedDummyProfileScreenView();
            ISettingsPresenter _profileScreenPresenter = new SettingsPresenter(_profileScreen, _mockedDummy._profileScreenSettingsService);

            _profileScreenPresenter.ChangePassword("1234", "12234", "1234");

            Assert.AreEqual("12234", _mockedDummy._user.password);
        }
示例#2
0
        public void ChangeGenderChanges()
        {
            MockedDummyProfileScreenSettingsService _mockedDummy = new MockedDummyProfileScreenSettingsService();
            IProfileScreen     _profileScreen          = new MockedDummyProfileScreenView();
            ISettingsPresenter _profileScreenPresenter = new SettingsPresenter(_profileScreen, _mockedDummy._profileScreenSettingsService);

            _profileScreenPresenter.ChangeGender("F");

            Assert.AreEqual("F", _profileScreen.Gender);
        }
示例#3
0
        public void ChangeGenderCatchesException()
        {
            MockedDummyProfileScreenSettingsService _mockedDummy = new MockedDummyProfileScreenSettingsService();
            IProfileScreen     _profileScreen          = new MockedDummyProfileScreenView();
            ISettingsPresenter _profileScreenPresenter = new SettingsPresenter(_profileScreen, _mockedDummy._profileScreenSettingsService);

            _mockedDummy.error = true;
            _profileScreenPresenter.ChangeGender("F");
            Assert.AreNotEqual("F", _profileScreen.Gender);
        }
示例#4
0
        public void ChangeAgeChanges()
        {
            MockedDummyProfileScreenSettingsService _mockedDummy = new MockedDummyProfileScreenSettingsService();
            IProfileScreen     _profileScreen          = new MockedDummyProfileScreenView();
            ISettingsPresenter _profileScreenPresenter = new SettingsPresenter(_profileScreen, _mockedDummy._profileScreenSettingsService);

            _profileScreenPresenter.ChangeAge(2);

            Assert.AreEqual(2, _profileScreen.Age);
        }
示例#5
0
        public void ChangeEmailCatchesException()
        {
            MockedDummyProfileScreenSettingsService _mockedDummy = new MockedDummyProfileScreenSettingsService();
            IProfileScreen     _profileScreen          = new MockedDummyProfileScreenView();
            ISettingsPresenter _profileScreenPresenter = new SettingsPresenter(_profileScreen, _mockedDummy._profileScreenSettingsService);

            _mockedDummy.error = true;
            _profileScreenPresenter.ChangeEmail("*****@*****.**");
            Assert.AreNotEqual("*****@*****.**", _profileScreen.Email);
        }
示例#6
0
        public void ChangeLastNameCatchesException()
        {
            MockedDummyProfileScreenSettingsService _mockedDummy = new MockedDummyProfileScreenSettingsService();
            IProfileScreen     _profileScreen          = new MockedDummyProfileScreenView();
            ISettingsPresenter _profileScreenPresenter = new SettingsPresenter(_profileScreen, _mockedDummy._profileScreenSettingsService);

            _mockedDummy.error = true;
            _profileScreenPresenter.ChangeLastName("MasterGigo");
            Assert.AreNotEqual("MasterGigo", _profileScreen.LastName);
        }
示例#7
0
        public void ChangeLastNameChanges()
        {
            MockedDummyProfileScreenSettingsService _mockedDummy = new MockedDummyProfileScreenSettingsService();
            IProfileScreen     _profileScreen          = new MockedDummyProfileScreenView();
            ISettingsPresenter _profileScreenPresenter = new SettingsPresenter(_profileScreen, _mockedDummy._profileScreenSettingsService);

            _profileScreenPresenter.ChangeLastName("MasterGigo");

            Assert.AreEqual("MasterGigo", _profileScreen.LastName);
        }
示例#8
0
        public void ChangeEmailChanges()
        {
            MockedDummyProfileScreenSettingsService _mockedDummy = new MockedDummyProfileScreenSettingsService();
            IProfileScreen     _profileScreen          = new MockedDummyProfileScreenView();
            ISettingsPresenter _profileScreenPresenter = new SettingsPresenter(_profileScreen, _mockedDummy._profileScreenSettingsService);

            _profileScreenPresenter.ChangeEmail("*****@*****.**");

            Assert.AreEqual("*****@*****.**", _profileScreen.Email);
        }