public void Should_parcour_list_when_nodes_added() { var nextNode = new Node(24); var node = new Node(12); node.AddNextNode(nextNode); var linked = new LinkedListCustom(node); var contentsExpected = $"12-24"; string contents = linked.GetAllNodesContents(); Check.That(contents).IsEqualTo(contentsExpected); }
public void Should_throw_an_exception_when_node_null_added() { var linked = new LinkedListCustom(null); Check.ThatCode(() => linked.GetAllNodesContents()).Throws <Exception>(); }