Home Reference Source Test Repository

Test

Description Identifier Count

should be instance of AbstractAlgorithm

-

should store parameter in "graph" field

-

should return false

-

should be instance of AlgorithmResult

-

should start with a step index of -1

-

should step forward in the timeline

-

should step forward from index before first step

-

should not step past the final step

-

should step backward in the timeline

-

should step back from index past final step

-

should not step past the initial step

-

should add the step to timeline

-

should be instance of StepBuilder

-

should create a new Step object in the "step" field

-

should store parameter as step description

-

should throw error if no Step has been created yet

-

should add change with nodeFields if given a Node

-

should add change with edgeFields if given an Edge

-

should throw error if object is not a Node or Edge

-

should add the step to the algorithm results

-

should set the "step" field to null

-

should be instance of Step

-

should store the parameter in "description" field

-

should have default description

-

should add change object to "changes" field

-

should apply the "pre" step values for all change objects

-

should apply the "during" step values for all change objects

-

should apply the "post" step values for all change objects

-

should create instance of TraversalAlgorithm

-

should contain field named "source"

-

should require "source" to be a Node

-

should mark node as visited in graphState

-

should add adjacent edge to queue

-

should add self-loop edges to queue

-

should not add visited edges to queue

-

should mark edge as visited in graphState

-

should add startNode to queue if unvisited and edge is not directed

-

should add only destNode to queue if unvisited and edge is directed

-

should not add visited nodes to queue

-

should handle self-loop edges

-

should return false if node has not been visited

-

should return false if edge has not been visited

-

should return true for node after calling visitNode on that node

-

should return true for edge after calling visitEdge on that edge

-

should throw error if next item is not Node or Edge

-

should start from #source field object

-

should not mark algorithm as complete if it hasn't started yet

-

should mark algorithm as complete if queue is empty

-

should return false if complete

-

should return true if not complete

-

should call visitNode if next item is a node

-

should call visitEdge if next item is an edge

-

should create instance of SolidEdge

-

should accept iterable arguments

-

should work with no arguments

-

should add to nodes

-

should not add duplicate node

-

should remove from nodes

-

should remove from nodes and edges

-

should not remove bogus node

-

should throw error when edge nodes are not in graph

-

should add to edges

-

should not add duplicate edge

-

should remove from edges

-

should throw error if nodes are not in graph

-

should return true if has edge

-

should not add duplicate edge

-

should return false for empty graph

-

should return null for empty graph

-

should return non-null when clicking on a node

-

should return true if within 60

-

should return false if farther than 60

-

should run callback(node) for each node

-

should break if callback(node) returns false

-

should create instance of CircleNode

-

should contain this point

-

should not contain this point

-

should do this distance calculation

-

should do this simple distance calculation 2

-

should do this negative point test

-

should do this simple point check

-

should account for a point within the radius of the node

-

should throw error when point is at node origin

-

creates instance of Queue

-

should be 0 for empty queue

-

should increment for each enqueue

-

should decrement for each dequeue

-

should clear the queue

-

should add item to queue

-

should add item to back of queue

-

should throw error when adding null

-

should throw error when adding undefined

-

should return null for empty queue

-

should return the first item in queue

-

should remove the first item in queue

-

should handle offset when more than half empty

-

should return null for empty queue

-

should return the first item in queue

-

should not remove item from queue

-

should throw error when checking null

-

should throw error when checking undefined

-

should return true if item is in queue

-

should return false if item is not in queue

-

should iterate through all items

-

should stop if callback returns false

-

should iterate in order starting from the front of the queue

-

creates instance of Serializer

-

should create valid graph obj export

-

should create valid graph obj import

-

should fail cleanly on importing malformed input

-

should create valid graph obj export

-

should create valid graph obj import

-

should create valid graph obj import

-

creates instance of Stack

-

should be 0 for empty stack

-

should increment for each push

-

should decrement for each pop

-

should clear the stack

-

should add item to stack

-

should add item to top of stack

-

should throw error when adding null

-

should throw error when adding undefined

-

should return null for empty stack

-

should return the item on top of stack

-

should remove the top item in stack

-

should return null for empty stack

-

should return the item on top of stack

-

should not remove item from stack

-

should throw error when checking null

-

should throw error when checking undefined

-

should return true if item is in stack

-

should return false if item is not in stack

-

should iterate through all items

-

should stop if callback returns false

-

should iterate in order starting from the top of the stack

-

should create instance of EdgeTool

-

should return true

-

should not select edges

-

should store node in "start"

-

should add edge if "start" node exists

-

should reset fields after adding edge

-

should do nothing if no node is selected

-

should deselect nodes if selected

-

should cancel action by clearing fields

-

should create instance of EraseTool

-

should return true

-

should return false

-

should remove nodes

-

should remove nodes and the edges connected to that node

-

should remove edges

-

should not handle other types of objects

-

should remove nodes

-

should remove nodes and the edges connected to that node

-

should remove edges

-

should not handle other types of objects

-

should create instance of MoveTool

-

should move node

-

should not move edge

-

should not allow dropping on other nodes

-

should move dragged node back to original position on drop failure

-

should ignore collision with edges

-

should not allow dropping non-node objects

-

should not allow collision with node

-

should ignore collision with edges

-

should create instance of NodeTool

-

should return true

-

should not add a node on another node

-

should add node if object is an edge

-

should add node if no collisions detected

-

should not add node if colliding with another node

-

should add node if no collisions detected

-

should not add node if colliding with another node

-

should create instance of Tool

-

should return false

-

should return false

-

should return true

-

should return true

-

should be a function

-

should be callable

-

creates instance of Line2D

-

should return true if point is between a and b

-

should return true if point is on the line but not between a and b

-

should return true if point has same coordinates as a

-

should return true if point has same coordinates as b

-

should return false if point is not on the line

-

creates instance of Point2D

-

should set values below the defined epsilon to zero

-

should return true if the same point object is passed in

-

should return true if coordinates are equal

-

should return false if x-coordinates are not equal

-

should return false if y-coordinates are not equal

-

should return the Euclidian distance (i.e. straight line distance)

-

should return zero if distance less than the defined epsilon

-

should not change the coordinates of the original point

-

should return vertex A on new triangle if on vertex A of old triangle

-

should return vertex B on new triangle if on vertex B of old triangle

-

should return vertex C on new triangle if on vertex C of old triangle

-

should return the centroid of new triangle if on centroid of old triangle

-

should return point on side of new triangle if on side of old triangle

-

should be able to handle triangle vertex order rotations

-

should be translated in the vector direction

-

should not modify values of the original point object

-

should create line with current point as first point

-

should create line with other point as second point

-

should create line using references to the original point objects

-

should create vector from first point to second point

-

should be able to return vectors with negative components

-

creates instance of Triangle2D

-

should return the area of the triangle

-

should return a negative value if vertexes are oriented clockwise around triangle

-

should return (1/3, 1/3) for centroid

-

should return centroid for coordinates (1/3, 1/3)

-

creates instance of Vector2D

-

should return the magnitude of the vector

-

should return true if the same vector object is passed in

-

should return true if the x- and y-components are equal

-

should return false if the x-components are not equal

-

should return false if the y-components are not equal

-

should add the x- and y-components

-

should work with negative x- and y- components

-

should not modify original vectors

-

should add the x- and y-components

-

should work with negative x- and y- components

-

should not modify original vectors

-

should find the dot product between two vectors

-

should be zero if the vectors are orthogonal

-

should be equal to product of magnitudes if the vectors are in the same direction

-

should be equal to negative product of magnitudes if the vectors are in the opposite direction

-

should not modify original vectors

-

should return the "cross product" of the two vectors

-

should return zero if the vectors are parallel

-

should return zero if the vectors have zero length

-

should not modify original vectors

-

should scale vector by the number

-

should scale vector by fractions

-

should scale vector by negative numbers

-

should not modify original vector

-

should rotate vector by the given number of degrees

-

should not modify original vector

-

should rotate vector by the given number of radians

-

should not modify original vector

-

should return the degrees between the vectors

-

should not return a negative value

-

should handle floating point precision errors

-

should return zero if vectors are in same direction

-

should return a projection of the current vector onto the given vector

-

should not modify original vectors

-