INNER CODE UNIT · Go

TestNewClient_DoesNotCreateClientWithBadConfigGiven

samsara/samsara · clients/go/client_test.go:23

func TestNewClient_DoesNotCreateClientWithBadConfigGiven(t *testing.T) {
	sets := []Config{
		{},
		NewConfig(),
	}

	for i, config := range sets {
		client, err := NewClient(config)

		if err == nil {
			t.Errorf("Set %d: Client init with incorrect config should return error. Got %+v", i, err)
		}
		if client != nil {
			t.Errorf("Set %d: Client shoud not have been created. Got %+v", i, client)
		}
	}
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…