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)); }
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); }