package test;

import java.util.Collection;

public abstract class TestDB {
  /**
   * The collection of tests in the given test database
   */
   public Collection<Test> tests;

  /**
   * Adds the input Test to the collection
   */
  /*@
    requires
    //
    // The Test is not null
    //
    (t != null);

    ensures
    //
    // The given Test is in the TestDB
    //
    tests.contains(t) 
    &&
     (\forall Test test ;
            tests.contains(test) <==>
                test.equals(t) || \old(tests).contains(test));
    @*/
   public abstract void add(Test t);

  /**
   * Removes the given Test from the TestDB
   */
  /*@
    requires
    //
    // The given Test is in the collection of test
    //
    (tests.contains(t));
    
    ensures
    //
    // A Test is in the database if and only if
    // it is not equal to the input test. 
    //
    (\forall Test test ; 
       tests.contains(test) <==>
          !test.equals(t) && \old(tests).contains(test)) ;

    @*/  
   public abstract Test remove(Test t);
}