Exemplo n.º 1
0
        public void Can_Create_And_Delete_Profile()
        {
            //Arrange
            var profile = MongoDbTestUtil.CreateProfileWithoutPreferences();

            //Act
            var p = _repo.SaveProfile(profile);

            //Assert
            Assert.IsNotNull(p.Id);
            Assert.AreEqual(p.UserId, profile.UserId);

            _repo.DeleteProfile(p.Id);
            var profileDeleted = _repo.Profiles.FirstOrDefault(x => x.Id == p.Id);

            Assert.IsTrue(profileDeleted == null);
        }