Example #1
0
        public void UpdateAgeThrowsException()
        {
            MockedDummyProfileScreenSettingsRepo _mockedDummy          = new MockedDummyProfileScreenSettingsRepo();
            IProfileScreenSettingsService        _profileScreenService = new ProfileScreenSettingsService(_mockedDummy._profileScreenSettingsRepository);

            Assert.Throws <IncorrectUserDataException>(() => _profileScreenService.UpdateAge(-10));
        }
Example #2
0
        public void UpdateAgeIsUpdating()
        {
            MockedDummyProfileScreenSettingsRepo _mockedDummy          = new MockedDummyProfileScreenSettingsRepo();
            IProfileScreenSettingsService        _profileScreenService = new ProfileScreenSettingsService(_mockedDummy._profileScreenSettingsRepository);

            _profileScreenService.UpdateAge(10);

            Assert.AreEqual(10, _mockedDummy._userInfo.age);
        }