dotnetcore / dotnetcore/WTM

实体类中的只读字段 在Test中也会生成并被赋值,从而报错

Open
#654 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C#
Stars
4.3k
Forks
896
PR merge metrics
No merged PRs in 30d

Description

例如
public class SoftwareVersion : BasePoco
{

public byte? Major { get; set; }
public string sMajor => Major == null ? "FF" : Major.ToString();
public byte? Minor { get; set; }
public string sMinor => Minor == null ? "FF" : Minor.ToString();

}
sMajor 在Test 测试工程中会被赋值

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.