Skip to content

Commit

Permalink
add GetFieldSize_Test
Browse files Browse the repository at this point in the history
  • Loading branch information
b4tman committed Feb 19, 2022
1 parent 8947224 commit 4793d4d
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion Tests/PasswordChanger1C_Tests/CommonModule_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,27 @@ public void ReplaceHashes_Test()

Assert.Equal(Expected, ReplaceHashes(Test_DataStr, OldHashes, NewHashes));
}

[Theory()]
[InlineData("B", 222, 1, 223)]
[InlineData("B", 222, 0, 222)]
[InlineData("N", 222, 1, 113)]
[InlineData("NC", 222, 1, 445)]
[InlineData("NVC", 222, 1, 447)]
[InlineData("RV", 222, 1, 17)]
[InlineData("I", 222, 1, 9)]
[InlineData("T", 222, 1, 9)]
[InlineData("DT", 222, 1, 8)]
[InlineData("NT", 222, 1, 9)]
public void GetFieldSize_Test(string FieldType, int FieldLength, int CouldBeNull, int ExpectedResult)
{
var Field = new AccessFunctions.TableFields
{
Type = FieldType,
Length = FieldLength,
CouldBeNull = CouldBeNull
};
Assert.Equal(ExpectedResult, GetFieldSize(Field));
}
}
}
}

0 comments on commit 4793d4d

Please sign in to comment.