Documentation
¶
Index ¶
- type BaseScenario
- type BasicDeliveryTest
- func (t *BasicDeliveryTest) Cleanup(ctx context.Context) error
- func (t *BasicDeliveryTest) Execute(ctx context.Context) error
- func (t *BasicDeliveryTest) SetRunner(runner *testing.TestRunner)
- func (t *BasicDeliveryTest) Setup(ctx context.Context) error
- func (t *BasicDeliveryTest) Verify(ctx context.Context) error
- type TestScenario
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseScenario ¶
type BaseScenario struct {
// contains filtered or unexported fields
}
BaseScenario provides common functionality for test scenarios
func NewBaseScenario ¶
func NewBaseScenario(name, description string, tracer *testing.TraceCollector) *BaseScenario
NewBaseScenario creates a new base scenario
func (*BaseScenario) Cleanup ¶
func (b *BaseScenario) Cleanup(ctx context.Context) error
Cleanup provides default cleanup implementation (does nothing)
func (*BaseScenario) Description ¶
func (b *BaseScenario) Description() string
Description returns the scenario description
func (*BaseScenario) Setup ¶
func (b *BaseScenario) Setup(ctx context.Context) error
Setup provides default setup implementation (does nothing)
func (*BaseScenario) Trace ¶
func (b *BaseScenario) Trace() *testing.TraceCollector
Trace returns the trace collector
type BasicDeliveryTest ¶
type BasicDeliveryTest struct {
*BaseScenario
// contains filtered or unexported fields
}
BasicDeliveryTest implements a basic email delivery test scenario
func NewBasicDeliveryTest ¶
func NewBasicDeliveryTest(from, to, subject, body string) *BasicDeliveryTest
NewBasicDeliveryTest creates a new basic delivery test
func (*BasicDeliveryTest) Cleanup ¶
func (t *BasicDeliveryTest) Cleanup(ctx context.Context) error
Cleanup performs cleanup after the test
func (*BasicDeliveryTest) Execute ¶
func (t *BasicDeliveryTest) Execute(ctx context.Context) error
Execute runs the main test logic
func (*BasicDeliveryTest) SetRunner ¶
func (t *BasicDeliveryTest) SetRunner(runner *testing.TestRunner)
SetRunner sets the test runner for this scenario
type TestScenario ¶
type TestScenario interface {
// Name returns the scenario name
Name() string
// Description returns a description of the scenario
Description() string
// Setup prepares the scenario for execution
Setup(ctx context.Context) error
// Execute runs the main scenario logic
Execute(ctx context.Context) error
// Verify checks that the scenario executed correctly
Verify(ctx context.Context) error
// Cleanup cleans up after the scenario
Cleanup(ctx context.Context) error
}
TestScenario defines the interface for test scenarios
Click to show internal directories.
Click to hide internal directories.