Skip to content

Commit

Permalink
Show additional field number in logs (savushkin-r-d#1237)
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillGutyrchik authored Nov 13, 2023
1 parent 9b2ba26 commit 7f4a30c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion EasyEplanner.Tests/EplanDevice.Test/IODevice.Test.cs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public void Check_CheckEmpty()
IODevice dev = new AO("KOAG4AO1", "+KOAG4-AO1", "Test device", 1, "KOAG", 4);
dev.SetSubType("AO");

string expectedResult = "\"KOAG4AO1\" : не привязанный канал AO \"\".\n\"KOAG4AO1\" : не задан параметр \"P_MIN_V\".\n\"KOAG4AO1\" : не задан параметр \"P_MAX_V\".\n";
string expectedResult = "\"KOAG4AO1\" : не привязанный канал AO \"\".\n\"KOAG4AO1\" : не задан параметр (доп. поле 3) \"P_MIN_V\".\n\"KOAG4AO1\" : не задан параметр (доп. поле 3) \"P_MAX_V\".\n";

Assert.AreEqual(expectedResult, dev.Check());
}
Expand Down
6 changes: 3 additions & 3 deletions src/Device/IODevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ public virtual string Check()
{
if (par.Value == null)
{
res += string.Format("\"{0}\" : не задан параметр \"{1}\".\n",
res += string.Format("\"{0}\" : не задан параметр (доп. поле 3) \"{1}\".\n",
name, par.Key.Name);
}
}
Expand All @@ -519,7 +519,7 @@ public virtual string Check()
{
if (par.Value == null)
{
res += string.Format("\"{0}\" : не задан рабочий параметр \"{1}\".\n",
res += string.Format("\"{0}\" : не задан рабочий параметр (доп. поле 5) \"{1}\".\n",
name, par.Key);
}
}
Expand All @@ -528,7 +528,7 @@ public virtual string Check()
{
if (prop.Value == null)
{
res += string.Format("\"{0}\" : не задано свойство \"{1}\".\n",
res += string.Format("\"{0}\" : не задано свойство (доп. поле 4) \"{1}\".\n",
name, prop.Key);
}
}
Expand Down

0 comments on commit 7f4a30c

Please sign in to comment.