public void BuildParameterTypeBuilder_FormatTest(int type, int display, string label, string description, string expected)
{
// Arrange
var testObject = new BuildParameterTypeBuilder();
var typeMap = new Dictionary<int, Action>
{
{0, () => { }},
{1, () => testObject.AsPassword()}
};
if (!typeMap.ContainsKey(type))
Assert.Inconclusive("Wrong 'type' argument value passed");
typeMap[type]();
var displayMap = new Dictionary<int, Action>
{
{0, () => { }},
{1, () => testObject.WithDisplayNormal()},
{2, () => testObject.WithDisplayPrompt()},
{3, () => testObject.WithDisplayHidden()}
};
if (!displayMap.ContainsKey(display))
Assert.Inconclusive("Wrong 'display' argument value passed");
displayMap[display]();
if (label != null)
testObject.WithLabel(label);
if (description != null)
testObject.WithDescription(description);
// Act
var result = testObject.Build();
// Assert
result.Should().Be(expected);
}