// A method to queue up factory jobs which works with the ISquareFactory contract static void QueueUpSomeFactoryJobs(ISquareFactory factory) { factory.SquareSize = 3; factory.SquareSize = 3; factory.AddMaterial(30, 30); factory.AddMaterial(3, 30); factory.SquareSize = 10; factory.AddMaterial(100, 30); }
public void AddMaterial_WithNegativeMaterialSize_Fails() { _factory.SquareSize = 1; Assert.ThrowsException <ArgumentOutOfRangeException>(() => _factory.AddMaterial(-1, -1)); }