Beispiel #1
0
 protected void AddCurrentUserToDb()
 {
     _personalCommonLegacyDb.Users.Add(new User {
         UserId = _currentUserId, IsPersonalCustomerAdmin = true, CustomerId = _customerId
     });
     _personalCommonLegacyDb.SaveChanges();
 }
        public async Task TestGetCurrentUserOkStatus()
        {
            //Arrange
            _personalCommonLegacyDb.Users.Add(new Repositories.Legacy.Models.User()
            {
                UserId = _userId
            });
            _personalCommonLegacyDb.SaveChanges();

            // Act
            var user = await _client.GetAsyncAndDeserialize <User>($"{_customerId}/users/{_userId}");

            // Assert
            Assert.NotNull(user);
            Assert.AreEqual(_userId, user.UserId);
        }
 protected void AddUsersToDb(List <Repositories.Legacy.Models.User> users)
 {
     _personalCommonLegacyDb.Users.AddRange(users);
     _personalCommonLegacyDb.SaveChanges();
 }