server

package
v0.0.0-...-18f9ab3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2023 License: MIT Imports: 2 Imported by: 0

README

Exercise 2 - writing tests with a Data store

I/O operations are cumbersome and should be avoided in unit tests. When you are building service that rely on database conenctions this makes writing unit tests and maintaining good test coverage cumbersome. Using the provided server.go and server_test.go add mock functions that that emulate the database layer. You should add mock fuctions to replicate one successful db response and one failed db response.

Solution here

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

type Connector

type Connector interface {
	// contains filtered or unexported methods
}

type User

type User struct {
	ID       int
	Name     string
	Email    string
	Password string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL