github
274 of 314 branches covered (87.26%)
Branch coverage included in aggregate %.
855 of 943 new or added lines in 26 files covered. (90.67%)
855 of 943 relevant lines covered (90.67%)
1804.95 hits per line
| 1 |
namespace SatisfactoryTree.Logic.Models |
|
| 2 |
{
|
|
| 3 |
public class Building |
|
| 4 |
{
|
|
|
|
public Building(string name) |
12,444✔ |
|
|
{
|
12,444✔ |
|
|
Name = name; |
12,444✔ |
|
|
} |
12,444✔ |
| 9 |
|
|
|
|
public string Name { get; set; } |
19,333✔ |
|
|
public double Power { get; set; } |
13,768✔ |
|
|
public double? MinPower { get; set; } |
1,404✔ |
|
|
public double? MaxPower { get; set; } |
1,404✔ |
| 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 |
} |