实战中这样的类,Shize保持了原始值, 但单元测试,又是好的,很奇怪。
public abstract class GrandPa
{
protected int Nothing;
protected GrandPa(int nothing)=> Nothing = nothing;
}
public abstract class Father : GrandPa
{
protected readonly long Shize;
protected Father(int nothing): base(nothing)
{
Shize = DateTime.Now.ToTimeStampInSecond();
}
}
public class Son : Father
{
public Son(int nothing) : base(nothing)
{
}
public long GetShiZe() => Shize;
}