package com.digistratum.microhost.RestServer.JsonApi;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;

public class ErrorTest {
	private Error sut;

	@BeforeEach
	public void setup() throws Exception {
		sut = new Error();
	}

	@Test
	public void testThat_toJson_returnsEmptyStructure() {
		String res = sut.toJson();
		assertEquals("{}", res);
	}

	// TODO: Fill in additional test cases covering the various, chained setters
}

@@ -438,83 +438,534 @@
 %7D%0A%0A%09
-// TODO: Fill in additional test cases covering the various, chained setters
+@Test%0A%09public void testThat_setters_chainPropertly() %7B%0A%09%09Meta meta = new Meta();%0A%09%09Source source = new Source();%0A%09%09Links links = new Links();%0A%09%09sut.setId(%22id%22)%0A%09%09%09%09.setCode(%22CODE%22)%0A%09%09%09%09.setDetail(%22DETAIL%22)%0A%09%09%09%09.setStatus(%22STATUS%22)%0A%09%09%09%09.setTitle(%22TITLE%22)%0A%09%09%09%09.setMeta(meta)%0A%09%09%09%09.setSource(source)%0A%09%09%09%09.setLinks(links)%0A%09%09%09%09.setId(%22ID%22);%0A%09%09String res = sut.toJson();%0A%09%09assertEquals(%22%7B%5C%22id%5C%22:%5C%22ID%5C%22,%5C%22links%5C%22:%7B%7D,%5C%22status%5C%22:%5C%22STATUS%5C%22,%5C%22code%5C%22:%5C%22CODE%5C%22,%5C%22title%5C%22:%5C%22TITLE%5C%22,%5C%22detail%5C%22:%5C%22DETAIL%5C%22,%5C%22source%5C%22:%7B%7D,%5C%22meta%5C%22:%7B%7D%7D%22, res);%0A%09%7D
 %0A%7D%0A

Complete test coverage for JsonApi.Errors class