public void Add_ValidUserToSlaveService_ExceptionThrown() { // Arrange var userStorageService = new UserStorageServiceSlave(new UserMemoryRepository()); var user = GetValidUser(); // Assert Assert.Throws <NotSupportedException>(() => userStorageService.Add(user)); }
public void SlaveMethodAdd_AnyUser_NotSupportedException() { User user = new User() { FirstName = "Alex", LastName = "Black", Age = 22 }; UserStorageServiceSlave slaveService1 = new UserStorageServiceSlave(new UserRepositoryWithState()); Assert.Catch <NotSupportedException>(() => slaveService1.Add(user)); }