Skip to content

Commit

Permalink
JS tests adjusted for previously refactored scripts. Test methods nam…
Browse files Browse the repository at this point in the history
…ing changed (decoupled from methods names, lowercased).
  • Loading branch information
jwaliszko committed Jul 8, 2014
1 parent ff4a94f commit 3dc72e8
Show file tree
Hide file tree
Showing 4 changed files with 241 additions and 243 deletions.
26 changes: 13 additions & 13 deletions src/ExpressiveAnnotations.Tests/LogicalExpressionsAnalyserTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace ExpressiveAnnotations.Tests
public class LogicalExpressionsAnalyserTest
{
[TestMethod]
public void Verify_tokenizer_logic()
public void verify_tokenization()
{
const string expression = "( true && (true) ) || false";
var tokenizer = new Tokenizer(new[] { @"true", @"false", @"&&", @"\|\|", @"\!", @"\(", @"\)" });
Expand Down Expand Up @@ -53,7 +53,7 @@ public void Verify_tokenizer_logic()
}

[TestMethod]
public void Verify_infix_to_postfix_conversion()
public void verify_infix_parsing()
{
var converter = new InfixParser();
Assert.AreEqual(converter.Convert("()"), "");
Expand Down Expand Up @@ -109,7 +109,7 @@ public void Verify_infix_to_postfix_conversion()
}

[TestMethod]
public void Verify_postfix_parser()
public void verify_postfix_parsing()
{
var parser = new PostfixParser();

Expand Down Expand Up @@ -174,7 +174,7 @@ public void Verify_postfix_parser()
}

[TestMethod]
public void Verify_complex_expression_evaluation()
public void verify_complex_expressions_evaluation()
{
var evaluator = new Evaluator();
Assert.IsTrue(evaluator.Compute("(true || ((true || (false || true)))) || (true && true && false || (false || true && (true && true || ((false))))) && false"));
Expand Down Expand Up @@ -215,7 +215,7 @@ public void Verify_complex_expression_evaluation()
}

[TestMethod]
public void Verify_comparison_options()
public void verify_comparison_options()
{
Assert.IsTrue(Comparer.Compute("aAa", "aAa", "==", true));
Assert.IsTrue(!Comparer.Compute("aAa", "aaa", "==", true));
Expand All @@ -231,7 +231,7 @@ public void Verify_comparison_options()
}

[TestMethod]
public void Verify_comparison_equals_non_empty()
public void verify_equality_of_non_empty_elements()
{
Assert.IsTrue(Comparer.Compute("aAa", "aAa", "==", true));
Assert.IsTrue(Comparer.Compute(0, 0, "==", true));
Expand All @@ -250,7 +250,7 @@ public void Verify_comparison_equals_non_empty()
}

[TestMethod]
public void Verify_comparison_equals_empty()
public void verify_equality_of_empty_elements()
{
Assert.IsTrue(Comparer.Compute("", "", "==", true));
Assert.IsTrue(Comparer.Compute(" ", " ", "==", true));
Expand All @@ -266,7 +266,7 @@ public void Verify_comparison_equals_empty()
}

[TestMethod]
public void Verify_comparison_greater_and_less()
public void verify_greater_and_less_comparisons()
{
// assumption - arguments provided have exact types

Expand Down Expand Up @@ -320,7 +320,7 @@ public void Verify_comparison_greater_and_less()
}

[TestMethod]
public void Verify_composed_error_message()
public void verify_error_message_composition()
{
const string expression = "{0} && ( (!{1} && {2}) || ({3} && {4}) ) && {5} && {6} && {7} || {1}";
var dependentProperties = new[] {"aaa", "bbb", "ccc", "ddd", "ddd", "eee", "fff", "ggg"};
Expand All @@ -333,7 +333,7 @@ public void Verify_composed_error_message()
}

[TestMethod]
public void Verify_typehelper_is_numeric()
public void verify_numeric_recognition()
{
Assert.IsTrue(1.1f.IsNumeric());
Assert.IsTrue(1.IsNumeric());
Expand All @@ -344,7 +344,7 @@ public void Verify_typehelper_is_numeric()
}

[TestMethod]
public void Verify_typehelper_is_date()
public void verify_date_recognition()
{
Assert.IsTrue(DateTime.Parse("Wed, 09 Aug 1995 00:00:00 GMT").IsDateTime());
Assert.IsTrue(!"Wed, 09 Aug 1995 00:00:00 GMT".IsDateTime());
Expand All @@ -355,7 +355,7 @@ public void Verify_typehelper_is_date()
}

[TestMethod]
public void Verify_typehelper_is_string()
public void verify_string_recognition()
{
object nullo = null;
Assert.IsTrue("".IsString());
Expand All @@ -366,7 +366,7 @@ public void Verify_typehelper_is_string()
}

[TestMethod]
public void Verify_typehelper_is_bool()
public void verify_bool_recognition()
{
Assert.IsTrue(true.IsBool());
Assert.IsTrue(!"true".IsBool());
Expand Down
18 changes: 9 additions & 9 deletions src/ExpressiveAnnotations.Tests/RequiredIfAttributeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class SecretModel
}

[TestMethod]
public void Verify_if_not_required()
public void verify_if_not_required()
{
var model = new Model {GoAbroad = false};
Assert.IsTrue(model.IsValid(m => m.PassportNumber));
Expand Down Expand Up @@ -92,7 +92,7 @@ public void Verify_if_not_required()
}

[TestMethod]
public void Verify_if_required()
public void verify_if_required()
{
var model = new Model { GoAbroad = true, EmptyField = null };
Assert.IsFalse(model.IsValid(m => m.EmptyField));
Expand All @@ -114,7 +114,7 @@ public void Verify_if_required()
}

[TestMethod]
public void Verify_if_nesting_works()
public void verify_if_nesting_works()
{
var model = new Model
{
Expand All @@ -126,7 +126,7 @@ public void Verify_if_nesting_works()

[TestMethod]
[ExpectedException(typeof(ArgumentNullException))]
public void Verify_if_proper_exception_thrown_when_extraction_fails_because_of_not_initializecd_prop_in_props_chain()
public void verify_if_proper_exception_thrown_when_extraction_fails_because_of_not_initializecd_prop_in_props_chain()
{
try
{
Expand All @@ -148,7 +148,7 @@ public void Verify_if_proper_exception_thrown_when_extraction_fails_because_of_n

[TestMethod]
[ExpectedException(typeof(ArgumentException))]
public void Verify_if_proper_exception_thrown_when_extraction_fails_because_of_incorrect_prop_name()
public void verify_if_proper_exception_thrown_when_extraction_fails_because_of_incorrect_prop_name()
{
try
{
Expand All @@ -165,7 +165,7 @@ public void Verify_if_proper_exception_thrown_when_extraction_fails_because_of_i
}

[TestMethod]
public void Verify_if_target_value_extraction_works()
public void verify_if_target_value_extraction_works()
{
var today = DateTime.UtcNow;
var tomorrow = today.AddDays(1);
Expand Down Expand Up @@ -195,7 +195,7 @@ public void Verify_if_target_value_extraction_works()
}

[TestMethod]
public void Verify_wildcard()
public void verify_wildcard()
{
var model = new Model
{
Expand All @@ -214,7 +214,7 @@ public void Verify_wildcard()

[TestMethod]
[ExpectedException(typeof(InvalidOperationException))]
public void Verify_types_consistency_requirement()
public void verify_types_consistency_requirement()
{
try
{
Expand All @@ -233,7 +233,7 @@ public void Verify_types_consistency_requirement()

[TestMethod]
[ExpectedException(typeof(InvalidOperationException))]
public void Verify_types_consistency_requirement_for_backend_property()
public void verify_types_consistency_requirement_for_backend_property()
{
try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ private class Model
}

[TestMethod]
public void Verify_if_not_required()
public void verify_if_not_required()
{
var model = new Model {GoAbroad = true, Country = "Poland", NextCountry = "France"};
Assert.IsTrue(model.IsValid(m => m.ReasonForTravel));
Expand All @@ -61,7 +61,7 @@ public void Verify_if_not_required()
}

[TestMethod]
public void Verify_if_required()
public void verify_if_required()
{
var model = new Model {GoAbroad = true, Country = "Poland", NextCountry = "Poland"};
Assert.IsFalse(model.IsValid(m => m.ReasonForTravel));
Expand Down
Loading

0 comments on commit 3dc72e8

Please sign in to comment.