Ejemplo n.º 1
0
        public void UpdateProfilePictureThrowsException()
        {
            MockedDummyProfileScreenRepository _mockedDummy = new MockedDummyProfileScreenRepository();
            IProfileScreenService _profileScreenService     = new ProfileScreenService(_mockedDummy._profileScreenRepository);

            _profileScreenService.UserAndUserInfoFromDBAndStoreitInModels(1);
            byte[] z = new byte[0];

            Assert.Throws <IncorrectUserDataException>(() => _profileScreenService.UpdateProfilePicture(z));
        }
Ejemplo n.º 2
0
        public void UserAndUserInfoFromDBAndStoreitInModelsIsSaving()
        {
            MockedDummyProfileScreenRepository _mockedDummy = new MockedDummyProfileScreenRepository();
            IProfileScreenService _profileScreenService     = new ProfileScreenService(_mockedDummy._profileScreenRepository);

            _profileScreenService.UserAndUserInfoFromDBAndStoreitInModels(1);

            Assert.AreEqual("PeterMast", _profileScreenService.GiveUserInformation().username);
            Assert.AreEqual("Peter", _profileScreenService.GiveUserInformation().firstname);
        }
Ejemplo n.º 3
0
        public void UpdateProfilePictureIsUpdating()
        {
            MockedDummyProfileScreenRepository _mockedDummy = new MockedDummyProfileScreenRepository();
            IProfileScreenService _profileScreenService     = new ProfileScreenService(_mockedDummy._profileScreenRepository);

            _profileScreenService.UserAndUserInfoFromDBAndStoreitInModels(1);
            byte[] z = new byte[10];
            _profileScreenService.UpdateProfilePicture(z);

            Assert.AreEqual(z, _profileScreenService.GiveUserInformation().picture);
        }