public void TestAssertInInnerTextForPlusSymbol() { this.MyTestInitialize(TestContext.GetCurrentMethod()); // same issue for SByteValue, Int16Value, IntegerValue, DecimalValue, SingleValue, DoubleValue { var v = new SByteValue(); v.InnerText = "+100"; sbyte v2 = v.Value; string t = v.InnerText; // Verify value and text Log.VerifyValue(v2, (sbyte)100, "{0}.Value", v.GetType().Name); Log.VerifyValue(t, "+100", "{0}.InnerText", v.GetType().Name); } { var v = new Int16Value(); v.InnerText = "+100"; Int16 v2 = v.Value; string t = v.InnerText; // Verify value and text Log.VerifyValue(v2, (Int16)100, "{0}.Value", v.GetType().Name); Log.VerifyValue(t, "+100", "{0}.InnerText", v.GetType().Name); } { var v = new Int32Value(); v.InnerText = "+100"; int v2 = v.Value; string t = v.InnerText; // Verify value and text Log.VerifyValue(v2, (int)100, "{0}.Value", v.GetType().Name); Log.VerifyValue(t, "+100", "{0}.InnerText", v.GetType().Name); } { var v = new IntegerValue(); v.InnerText = "+100"; long v2 = v.Value; string t = v.InnerText; // Verify value and text Log.VerifyValue(v2, (long)100, "{0}.Value", v.GetType().Name); Log.VerifyValue(t, "+100", "{0}.InnerText", v.GetType().Name); } { var v = new DecimalValue(); v.InnerText = "+100"; decimal v2 = v.Value; string t = v.InnerText; // Verify value and text Log.VerifyValue(v2, (decimal)100, "{0}.Value", v.GetType().Name); Log.VerifyValue(t, "+100", "{0}.InnerText", v.GetType().Name); } { var v = new SingleValue(); v.InnerText = "+100"; float v2 = v.Value; string t = v.InnerText; // Verify value and text Log.VerifyValue(v2, (float)100, "{0}.Value", v.GetType().Name); Log.VerifyValue(t, "+100", "{0}.InnerText", v.GetType().Name); } { var v = new DoubleValue(); v.InnerText = "+100"; double v2 = v.Value; string t = v.InnerText; // Verify value and text Log.VerifyValue(v2, (double)100, "{0}.Value", v.GetType().Name); Log.VerifyValue(t, "+100", "{0}.InnerText", v.GetType().Name); } }
public void TestAssertInInnerTextForPlusSymbol() { // same issue for SByteValue, Int16Value, IntegerValue, DecimalValue, SingleValue, DoubleValue { var v = new SByteValue(); v.InnerText = "+100"; sbyte v2 = v.Value; string t = v.InnerText; // Verify value and text Log.VerifyValue(v2, (sbyte)100, "{0}.Value", v.GetType().Name); Log.VerifyValue(t, "+100", "{0}.InnerText", v.GetType().Name); } { var v = new Int16Value(); v.InnerText = "+100"; short v2 = v.Value; string t = v.InnerText; // Verify value and text Log.VerifyValue(v2, (short)100, "{0}.Value", v.GetType().Name); Log.VerifyValue(t, "+100", "{0}.InnerText", v.GetType().Name); } { var v = new Int32Value(); v.InnerText = "+100"; int v2 = v.Value; string t = v.InnerText; // Verify value and text Log.VerifyValue(v2, 100, "{0}.Value", v.GetType().Name); Log.VerifyValue(t, "+100", "{0}.InnerText", v.GetType().Name); } { var v = new IntegerValue(); v.InnerText = "+100"; long v2 = v.Value; string t = v.InnerText; // Verify value and text Log.VerifyValue(v2, 100L, "{0}.Value", v.GetType().Name); Log.VerifyValue(t, "+100", "{0}.InnerText", v.GetType().Name); } { var v = new DecimalValue(); v.InnerText = "+100"; decimal v2 = v.Value; string t = v.InnerText; // Verify value and text Log.VerifyValue(v2, 100M, "{0}.Value", v.GetType().Name); Log.VerifyValue(t, "+100", "{0}.InnerText", v.GetType().Name); } { var v = new SingleValue(); v.InnerText = "+100"; float v2 = v.Value; string t = v.InnerText; // Verify value and text Log.VerifyValue(v2, 100F, "{0}.Value", v.GetType().Name); Log.VerifyValue(t, "+100", "{0}.InnerText", v.GetType().Name); } { var v = new DoubleValue(); v.InnerText = "+100"; double v2 = v.Value; string t = v.InnerText; // Verify value and text Log.VerifyValue(v2, 100D, "{0}.Value", v.GetType().Name); Log.VerifyValue(t, "+100", "{0}.InnerText", v.GetType().Name); } }