< Summary

Class:FixedHierarchical
Assembly:bamlab.micromissiles
File(s):/github/workspace/Assets/Scripts/Hierarchical/FixedHierarchical.cs
Covered lines:13
Uncovered lines:0
Coverable lines:13
Total lines:24
Line coverage:100% (13 of 13)
Covered branches:0
Total branches:0
Covered methods:12
Total methods:12
Method coverage:100% (12 of 12)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
FixedHierarchical()0%110100%
FixedHierarchical(...)0%110100%
FixedHierarchical(...)0%110100%
FixedHierarchical(...)0%110100%

File(s)

/github/workspace/Assets/Scripts/Hierarchical/FixedHierarchical.cs

#LineLine coverage
 1using UnityEngine;
 2
 3// The fixed hierarchical object represents a hierarchical object with a fixed position, velocity,
 4// and acceleration and should primarily be used for testing.
 5public class FixedHierarchical : HierarchicalBase, IHierarchical {
 6  // Shadowing is necessary because the parent's position, velocity, and acceleration are not
 7  // settable. The speed must be shadowed to prevent using the parent's velocity property.
 11278  public new Vector3 Position { get; set; }
 3979  public new Vector3 Velocity { get; set; }
 1810  public new float Speed => Velocity.magnitude;
 34311  public new Vector3 Acceleration { get; set; }
 64812  public override bool IsTerminated => false;
 13
 35714  public FixedHierarchical() : this(position: Vector3.zero) {}
 15  public FixedHierarchical(in Vector3 position)
 70816      : this(position: position, velocity: Vector3.zero) {}
 17  public FixedHierarchical(in Vector3 position, in Vector3 velocity)
 82518      : this(position: position, velocity: velocity, acceleration: Vector3.zero) {}
 56819  public FixedHierarchical(in Vector3 position, in Vector3 velocity, in Vector3 acceleration) {
 28420    Position = position;
 28421    Velocity = velocity;
 28422    Acceleration = acceleration;
 28423  }
 24}