API for testing
Issues
Motivation
As a developer I want to:
- Prepare test context data for storages like Record, View
- Prepare test context data for storages like ArgumentObject, WLog, HTTP, etc.
Storages
StorageEvent = "sys.Event"
StorageSendMail = "sys.SendMail"
StorageRecord = "sys.Record"
StorageView = "sys.View"
StorageWLog = "sys.WLog"
StoragePLog = "sys.PLog"
StorageHttp = "sys.Http"
StorageAppSecret = "sys.AppSecret"
StorageRequestSubject = "sys.RequestSubject"
StorageResult = "sys.Result"
StorageCommandContext = "sys.CommandContext"
Context
Proposal
packages
- state
- safestate
- teststate
Functional design
Test examples:
- Basic Usage: Event, View
- Actualizer: WLog Get and Read, Secret, Http, SendMail
- Command: CommandContext, Record, RequestSubject, Result
Technical design
Principles
- Use events to prepare context CUDs and IArgumentObject data
- Use IAppStructs to prepare View context
- IEvents.PutWlog to prepare WLog context
- SafeStateAPI is a low-level API for State which implements the following principles:
- used by extension engines
- automatically converts package paths (extensions work with full paths)
- Keys, Values, Key- and Value-Builders are represented with numbers, to be transferred between Host and Extension environments.