title: Pointless unit test
body: <p>I have a baseService class that most of my services inherit from, which looks like this.</p>
  
  <pre><code>public abstract class BaseService&lt;T&gt; : IBaseService&lt;T&gt;
      where T : class, IBaseEntity
  {
      protected IDataContext _context;
      protected IValidator&lt;T&gt; _validator = null;
  
      protected BaseService(IDataContext context)
      {
          _context = context;
      }
  
      protected BaseService(IDataContext context, IValidator&lt;T&gt; validator)
          : this(context)
      {
          _validator = validator;
      }
  
      public virtual async Task&lt;ICollection&lt;T&gt;&gt; GetAllAsync()
      {
          return await _context.Set&lt;T&gt;().ToListAsync();
      }
  
      public virtual Task&lt;T&gt; GetAsync(long id)
      {
          return _context.Set&lt;T&gt;().Where(e =&gt; e.Id == id).FirstOrDefaultAsync();
      }
  
      public virtual Task&lt;ValidationResult&gt; ValidateAsync(T t)
      {
          if (_validator == null) throw new MissingFieldException("Validator does not exist for class " + t.GetType().ToString() + ". override method if no validation needed");
          return _validator.ValidateAsync(t);
      }
  
      public virtual async Task&lt;int&gt; AddAsync(T t)
      {
          var results = await ValidateAsync(t);
  
          if (!results.IsValid) {
              throw new ValidationException(results.Errors);
          }
  
          if (_context.GetState(t) == EntityState.Detached)
          {
              _context.Set&lt;T&gt;().Add(t);
              _context.SetState(t, EntityState.Added);
          }
  
          return await _context.SaveChangesAsync();
      }
  
      public virtual async Task&lt;int&gt; UpdateAsync(T updated)
      {
          var results = await ValidateAsync(updated);
  
          if (!results.IsValid)
          {
              throw new ValidationException(results.Errors);
          }
  
          if (_context.GetState(updated) == EntityState.Detached)
          {
              _context.SetState(updated, EntityState.Modified);
          }
  
          return await _context.SaveChangesAsync();
      }
  
      public virtual Task&lt;int&gt; DeleteAsync(T t)
      {
          _context.SetState(t, EntityState.Deleted);
  
          return _context.SaveChangesAsync();
      }
  }
  </code></pre>
  
  <p>Am i right in thinking that it is pointless to unit test this in every single one of my classes that implements this service?  But instead, test the functionality for each test in my integration testing?</p>