public void ShouldCreateAProfile()
            {
                IVRProfile profileToCreate = new IVRProfile()
                {
                  ProfileId = 1000001,
                  FullName = "basil",
                  PIN = "1234"
                };

                ProfileRepository repository = new ProfileRepository(DEVELOPMENT_CONNECTION_STRING);

                var result = repository.Create(profileToCreate);

                Assert.IsNotNull(result);
            }
            public void ShouldReturnFalseWhenUserProfileCannotBeDeleted()
            {
                int profileId = 5555555;

                ProfileRepository repository = new ProfileRepository(DEVELOPMENT_CONNECTION_STRING);

                var result = repository.Delete(new IVRProfile() { ProfileId = profileId });

                Assert.AreEqual(false, result);
            }
            public void ShouldDeleteUserProfile()
            {
                int profileId = 123456;

                ProfileRepository repository = new ProfileRepository(DEVELOPMENT_CONNECTION_STRING);

                var result = repository.Delete(new IVRProfile() { ProfileId = profileId });

                Assert.AreEqual(true, result);
            }
            public void ShouldUpdateProfile()
            {
                IVRProfile profile = new IVRProfile()
                {
                  ProfileId = 11112,
                  Culture = "en",
                  PIN = "1234",
                  FullName = "Basil",
                  PhoneNumber = "+22222221"
                };

                ProfileRepository repository = new ProfileRepository(DEVELOPMENT_CONNECTION_STRING);

                var createdEntity = repository.Create(profile);

                createdEntity.Culture = "fr";
                createdEntity.PhoneNumber = "+1111112";
                createdEntity.PIN = "4321";

                repository.Update(createdEntity);

                var updatedEntity = repository.Get(11112);

                Assert.AreEqual(createdEntity.Culture, updatedEntity.Culture);
                Assert.AreEqual(createdEntity.PhoneNumber, updatedEntity.PhoneNumber);
                Assert.AreEqual(createdEntity.PIN, updatedEntity.PIN);
            }
            public void ShouldReturnUserProfile()
            {
                int userId = 123456;

                ProfileRepository repository = new ProfileRepository(DEVELOPMENT_CONNECTION_STRING);

                var user = repository.Get(userId);

                Assert.IsNotNull(user);
            }
            public void ShouldReturnAUserProfileByLookingUpPhoneNumber()
            {
                var phoneNumberToLookup = "+1111111";

                ProfileRepository repository = new ProfileRepository(DEVELOPMENT_CONNECTION_STRING);

                var userPorfile = repository.GetByPhoneNumber(phoneNumberToLookup);

                Assert.IsNotNull(userPorfile);
                Assert.AreEqual(phoneNumberToLookup, userPorfile.PhoneNumber);
            }
            public void ShouldReturnAllEntities()
            {
                ProfileRepository repository = new ProfileRepository(DEVELOPMENT_CONNECTION_STRING);

                var allProfiles = repository.GetAll();

                Assert.AreEqual(1, allProfiles.Count);
            }