return false;
}
+ public bool CheckVector2(Vector2 vectorSrc, Vector2 vectorDst)
+ {
+ if (vectorSrc.X == vectorDst.X && vectorSrc.Y == vectorDst.Y)
+ return true;
+
+ return false;
+ }
+
[SetUp]
public void Init()
{
map.Find(0, "blurRadius").Get(out float blurRadius);
Assert.AreEqual(blurRadius, shadow.BlurRadius, "Should be equal!");
- Assert.AreEqual(offset.X, shadow.Offset.X, "Should be equal!");
- Assert.AreEqual(offset.Y, shadow.Offset.Y, "Should be equal!");
+ Assert.AreEqual(true, CheckVector2(offset, shadow.Offset), "Should be true!");
Assert.AreEqual(true, CheckColor(color, shadow.Color), "Should be true!");
tlog.Debug(tag, $"TextMapHelperGetShadowMap END (OK)");
var shadow = TextMapHelper.GetShadowStruct(map);
Assert.AreEqual(blurRadius, shadow.BlurRadius, "Should be equal!");
- Assert.AreEqual(offset.X, shadow.Offset.X, "Should be equal!");
- Assert.AreEqual(offset.Y, shadow.Offset.Y, "Should be equal!");
+ Assert.AreEqual(true, CheckVector2(offset, shadow.Offset), "Should be true!");
Assert.AreEqual(true, CheckColor(color, shadow.Color), "Should be true!");
tlog.Debug(tag, $"TextMapHelperGetShadowStruct END (OK)");
map.Add(stringKey, new PropertyValue(value));
var result = TextMapHelper.GetVector2FromMap(map, stringKey);
- Assert.AreEqual(value.X, result.X, "Should be equal!");
- Assert.AreEqual(value.Y, result.Y, "Should be equal!");
+ Assert.AreEqual(true, CheckVector2(value, result), "Should be true!");
tlog.Debug(tag, $"TextMapHelperGetVector2FromMap END (OK)");
}
return false;
}
+ public bool CheckVector2(Vector2 vectorSrc, Vector2 vectorDst)
+ {
+ if (vectorSrc.X == vectorDst.X && vectorSrc.Y == vectorDst.Y)
+ return true;
+
+ return false;
+ }
+
[SetUp]
public void Init()
{
Assert.IsInstanceOf<EmbeddedItemInfo>(testingTarget, "Should be an instance of EmbeddedItemInfo type.");
testingTarget.Position = new Vector2(100.0f, 200.0f);
- Assert.AreEqual(100.0f, testingTarget.Position.X, "Should be equal!");
- Assert.AreEqual(200.0f, testingTarget.Position.Y, "Should be equal!");
+ var position = new Vector2(100.0f, 200.0f);
+ Assert.AreEqual(true, CheckVector2(position, testingTarget.Position), "Should be true!");
+ position.Dispose();
testingTarget.Dispose();
tlog.Debug(tag, $"TextUtilsEmbeddedItemInfoPosition END (OK)");
}
Assert.IsInstanceOf<ShadowParameters>(testingTarget, "Should be an instance of ShadowParameters type.");
testingTarget.Offset = new Vector2(0.3f, 0.8f);
- Assert.AreEqual(0.3f, testingTarget.Offset.X, "Should be equal!");
- Assert.AreEqual(0.8f, testingTarget.Offset.Y, "Should be equal!");
+ var offset = new Vector2(0.3f, 0.8f);
+ Assert.AreEqual(true, CheckVector2(offset, testingTarget.Offset), "Should be true!");
+ offset.Dispose();
testingTarget.Dispose();
tlog.Debug(tag, $"TextUtilsShadowParametersOffset END (OK)");
}