public void The_Load_Method_Creates_The_Correct_UserOption() { ProjectDeserialiserV1 deserialiser = new ProjectDeserialiserV1(fileController); var option = deserialiser.ReadUserOption(expectedXml.GetXmlDocRoot()); Assert.That(option.VariableName, Is.EqualTo("var")); Assert.That(option.VarType, Is.EqualTo(typeof(string))); Assert.That(option.Text, Is.EqualTo("test-text")); Assert.That(option.Description, Is.EqualTo("test-description")); Assert.That(option.Category, Is.EqualTo(""), "No category should be loaded at this level, see LoadUserOptionsDetails"); Assert.That(option.DefaultValueFunctionBody, Is.EqualTo("dv-body")); Assert.That(option.IteratorType, Is.EqualTo(typeof(bool))); Assert.That(option.ValidatorFunctionBody, Is.EqualTo("validator body")); Assert.That(option.DisplayToUserFunctionBody, Is.EqualTo("return true;")); Assert.That(option.ResetPerSession, Is.True); }
public void The_Values_Are_Loaded_Properly() { ProjectDeserialiserV1 deserialiser = new ProjectDeserialiserV1(fileController); var option = deserialiser.ReadUserOption(expectedXml.GetXmlDocRoot()); Assert.That(option.Values, Has.Count(1)); Assert.That(option.Values[0], Is.EqualTo("val1")); }