public void Data_is_set_when_constructing_with_data() { var data = "data"; var condition = new RouteCondition(checkFunc, data); Assert.Same(data, condition.Data); }
/// <summary> /// Adds a condition to the route. /// </summary> public void AddCondition(RouteCondition condition) { if (Conditions == null) { lock (this) { if (Conditions == null) { Conditions = new List <RouteCondition>(); } } } Conditions.Add(condition); }
public void Condition_is_set() { var condition = new RouteCondition(checkFunc); Assert.Equal(checkFunc, condition.Condition); }
public void Condition_is_set_when_constructing_with_data() { var condition = new RouteCondition(checkFunc, "data"); Assert.Equal(checkFunc, condition.Condition); }
public void Data_is_null_if_constructor_without_data_is_used() { var condition = new RouteCondition(checkFunc); Assert.Null(condition.Data); }