title: What is the preferred way to managing order in the builder pattern?
body: <p>I have created a fluent builder style pattern for helping with data loading my tests. The order of certain methods is important and was wondering what the preferred method to managing the correct sequence is.</p>
  
  <p>I have the following at the moment:</p>
  
  <pre><code>using NUnit.Framework;
  
  [TestFixture]
  public class DataBuilderTests
  {
      [Test]
      public void Can_NAME()
      {
          new DataLoader()
              .Start() // must be called first
              .Setup() // then called next
              .LoadEmployees() // optional order not NB
              .LoadProducts() // optional order not NB
              .StartCleanup() // begin cleanup
              .CleanupEmployees() // optional order not NB
              .CleanupProducts() // optional order not NB
              .End();
      }
  }
  
  public class DataLoader
  {
      public DataBuilderSetup Start()
      {
          return new DataBuilderSetup(this);       
      }
  }
  
  public class DataBuilderSetup
  {
      private readonly DataLoader _dataLoader;
  
      public DataBuilderSetup(DataLoader dataLoader)
      {
          _dataLoader = dataLoader;
      }
  
      public DataBuilderOptions Setup()
      {
          // do setup
          return new DataBuilderOptions(_dataLoader);
      }
  }
  
  public class DataBuilderOptions
  {
      private readonly DataLoader _dataLoader;
  
      public DataBuilderOptions(DataLoader dataLoader)
      {
          _dataLoader = dataLoader;
      }
  
      public DataBuilderOptions LoadEmployees()
      {
          // load
          return this;
      }
  
      public DataBuilderOptions LoadProducts()
      {
          // load
          return this;
      }
  
      public DataBuilderCleanupOptions StartCleanup()
      {
          return new DataBuilderCleanupOptions(_dataLoader);
      }
  }
  
  public class DataBuilderCleanupOptions
  {
      private readonly DataLoader _dataLoader;
  
      public DataBuilderCleanupOptions(DataLoader dataLoader)
      {
          _dataLoader = dataLoader;
      }
  
      public DataBuilderCleanupOptions CleanupEmployees()
      {
          // cleanup
          return this;
      }
  
      public DataBuilderCleanupOptions CleanupProducts()
      {
          // cleanup
          return this;
      }
  
      public DataLoader End()
      {
          return _dataLoader;
      }
  }
  </code></pre>