public void GraphicsTypeConverterConvertFromPixel() { tlog.Debug(tag, $"GraphicsTypeConverterConvertFromPixel START"); var testingTarget = new GraphicsTypeConverter(); Assert.IsNotNull(testingTarget, "Can't create success object GraphicsTypeConverter"); Assert.IsInstanceOf <GraphicsTypeConverter>(testingTarget, "Should be an instance of GraphicsTypeConverter type."); var result = testingTarget.ConvertFromPixel(160.0f); Assert.IsNotNull(result); tlog.Debug(tag, $"GraphicsTypeConverterConvertFromPixel END (OK)"); }
public void GraphicsTypeConverterConvertScriptToPixel() { tlog.Debug(tag, $"GraphicsTypeConverterConvertScriptToPixel START"); var testingTarget = new GraphicsTypeConverter(); Assert.IsNotNull(testingTarget, "Can't create success object GraphicsTypeConverter"); Assert.IsInstanceOf <GraphicsTypeConverter>(testingTarget, "Should be an instance of GraphicsTypeConverter type."); var result = testingTarget.ConvertScriptToPixel("160dp"); Assert.IsNotNull(result); result = testingTarget.ConvertScriptToPixel("160px"); Assert.AreEqual(160.0f, result, "Should be equal!"); result = testingTarget.ConvertScriptToPixel("160.0f"); Assert.AreEqual(0.0f, result, "Should be equal!"); tlog.Debug(tag, $"GraphicsTypeConverterConvertScriptToPixel END (OK)"); }