Post
GoLang
How can I do a test setup by the test package in Golang?
Is there any possible way to do entire test setup processing that is available for every test when utilizing the test package.
Example:
[TestFixture]
public class SuccessTests {
[SetUp] public void Init()
{ /* Loads the test data */ } }
Posted on 26th March 2023
This can be accomplished by placing a init() function within the _test.go file. That will be run ere the init() function.
package main
func init()
{ /* loads the test data */ }
STILL GOT QUERIES?
Copyright © 2013 - 2023 MindMajix Technologies