예제 #1
0
        public void UserRepository_AddDeviceRegistration()
        {
            UserRepository userRepository = new UserRepository(_mockContext.Object);

            userRepository.AddDeviceRegistration("UserComplete", new byte[0], 1, new byte[0], new byte[0]);

            _mockContext.Verify(v => v.SaveChanges(), Times.Once);
        }
예제 #2
0
        public void UserRepository_AddDeviceRegistrationNoUser()
        {
            UserRepository userRepository = new UserRepository(_mockContext.Object);

            userRepository.AddDeviceRegistration("NoUser", new byte[0], 1, new byte[0], new byte[0]);

            _mockContext.Verify(v => v.SaveChanges(), Times.Never);
        }