本文整理汇总了C#中Transformation.Height方法的典型用法代码示例。如果您正苦于以下问题:C# Transformation.Height方法的具体用法?C# Transformation.Height怎么用?C# Transformation.Height使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Transformation
的用法示例。
在下文中一共展示了Transformation.Height方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestResponsiveBreakpointsToJson
public void TestResponsiveBreakpointsToJson()
{
var responsiveBreakpoint = new ResponsiveBreakpoint().ToString(Formatting.None);
Assert.AreEqual("{\"create_derived\":true}", responsiveBreakpoint, "an empty ResponsiveBreakpoint should have create_derived=true");
var expectedToken1 = JToken.Parse("{\"create_derived\":false,\"max_width\":500,\"min_width\":100,\"max_images\":5,\"transformation\":\"a_45\"}");
IEnumerable<string> expectedList1 = expectedToken1.Children().Select(s => s.ToString(Formatting.None));
Transformation transform = new Transformation().Angle(45);
var breakpoint = new ResponsiveBreakpoint().CreateDerived(false)
.Transformation(transform)
.MaxWidth(500)
.MinWidth(100)
.MaxImages(5);
var actualList1 = breakpoint.Children().Select(s => s.ToString(Formatting.None));
CollectionAssert.AreEquivalent(expectedList1, actualList1);
breakpoint.Transformation(transform.Height(210).Crop("scale"));
var expectedToken2 = JToken.Parse("{\"create_derived\":false,\"max_width\":500,\"min_width\":100,\"max_images\":5,\"transformation\":\"a_45,c_scale,h_210\"}");
var expectedList2 = expectedToken2.Children().Select(s => s.ToString(Formatting.None));
var actualList2 = breakpoint.Children().Select(s => s.ToString(Formatting.None));
CollectionAssert.AreEquivalent(expectedList2, actualList2);
}