File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // Sample test to show how to write a basic unit test.
12package listing01
23
34import (
Original file line number Diff line number Diff line change 1+ // Sample test to show how to write a basic unit table test.
12package listing02
23
34import (
Original file line number Diff line number Diff line change 1+ // Sample test to show how to mock an HTTP GET call internally.
12package listing03
23
34import (
Original file line number Diff line number Diff line change 1- // This sample code implement a web service.
1+ // This sample code implement a simple web service.
22package main
33
44import (
Original file line number Diff line number Diff line change 1- // Sample example test for the LogResponse function .
1+ // Sample test to show how to write a basic example test .
22package main_test
33
44import (
Original file line number Diff line number Diff line change 1- // Sample unit test for testing an internal endpoint.
1+ // Sample test to show how to test the execution of an internal endpoint.
22package main_test
33
44import (
@@ -17,7 +17,7 @@ func init() {
1717 ex .Routes ()
1818}
1919
20- // TestDownload tests if download web content is working .
20+ // TestSendJSON testing the sendjson internal endpoint .
2121func TestSendJSON (t * testing.T ) {
2222 t .Log ("Given the need to test the SendJSON endpoint." )
2323 {
Original file line number Diff line number Diff line change 11// go test -run=XXX -bench=.
22
3- // This sample test demonstrates how to write a benchmark test .
3+ // Sample test to show how to write benchmark tests .
44package listing05
55
66import "testing"
You can’t perform that action at this time.
0 commit comments