public void IfElse()
{
List<Transformation> transformations = new List<Transformation>()
{
new Transformation().IfCondition("w_lt_200").Crop("fill").Height(120).Width(80),
new Transformation().IfElse().Crop("fill").Height(90).Width(100)
};
var transformation = new Transformation(transformations);
var sTransform = transformation.ToString();
Assert.AreEqual("if_w_lt_200,c_fill,h_120,w_80/if_else,c_fill,h_90,w_100", sTransform, "should support if_else with transformation parameters");
transformations = new List<Transformation>()
{
new Transformation().IfCondition("w_lt_200"),
new Transformation().Crop("fill").Height(120).Width(80),
new Transformation().IfElse(),
new Transformation().Crop("fill").Height(90).Width(100)
};
transformation = new Transformation(transformations);
sTransform = transformation.ToString();
Assert.IsTrue(sTransform.Contains("/if_else/"), "if_else should be without any transformation parameters");
Assert.AreEqual("if_w_lt_200/c_fill,h_120,w_80/if_else/c_fill,h_90,w_100", sTransform, "should be proper transformation string");
}