github
244 of 282 branches covered (86.52%)
Branch coverage included in aggregate %.
779 of 866 new or added lines in 25 files covered. (89.95%)
779 of 866 relevant lines covered (89.95%)
468.95 hits per line
| 1 |
namespace SatisfactoryTree.Logic.Models |
|
| 2 |
{
|
|
| 3 |
public class Building |
|
| 4 |
{
|
|
|
|
public Building(string name) |
3,111✔ |
|
|
{
|
3,111✔ |
|
|
Name = name; |
3,111✔ |
|
|
} |
3,111✔ |
| 9 |
|
|
|
|
public string Name { get; set; } |
4,049✔ |
|
|
public double Power { get; set; } |
3,442✔ |
|
|
public double? MinPower { get; set; } |
351✔ |
|
|
public double? MaxPower { get; set; } |
351✔ |
| 14 |
|
|
| 15 |
public override bool Equals(object? obj) |
|
|
NEW
|
{
|
× |
|
NEW
|
if (obj is Building otherBuilding)
|
|
|
NEW
|
{
|
× |
|
NEW
|
return Name == otherBuilding.Name;
|
× |
| 20 |
} |
|
|
NEW
|
return false; |
× |
|
NEW
|
} |
× |
| 23 |
|
|
| 24 |
public override int GetHashCode() |
|
|
NEW
|
{
|
× |
|
NEW
|
return Name.GetHashCode();
|
× |
|
NEW
|
} |
× |
| 28 |
} |
|
| 29 |
} |