You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It might come very handy if we could use a WorkNet instance in unit tests to test new features and upgrades with the actual data currently on the contract deployed to mainnet.
The text was updated successfully, but these errors were encountered:
WorkNet sits on top of StateServiceStore + PersistentTrackingStore from the Neo Blockchain Toolkit Library. I think for test purposes, we could build an xuint fixture to enable the StateServiceStore to be shared across tests. Then, in a given test you could create a MemoryTrackingStore instance on top of the StateServiceStore provided by the fixture to enable a clean environment for each test.
// assuming a StateServiceStoreFixture injected as fixture test class field usingvarstore=newMemoryTrackingStore(fixture.StateServiceStore);usingvarsnapshot=newSnapshotCache(store.GetSnapshot());
Note, StateServiceStore requires async initialization, and I'm not sure how to do that with xuint off the top of my head
devhawk
changed the title
WorkNet integration for unit tests
StateServiceStore Fixture for unit tests
Nov 16, 2022
Following our quick discussion on Discord:
It might come very handy if we could use a WorkNet instance in unit tests to test new features and upgrades with the actual data currently on the contract deployed to mainnet.
The text was updated successfully, but these errors were encountered: