public void CreateBacktraceVariableWithNullStackFrame() { // Arrange JObject json = SerializationTestData.GetBacktraceJsonObject(); Exception exception = null; NodeBacktraceVariable result = null; // Act try { result = new NodeBacktraceVariable(null, json); } catch (Exception e) { exception = e; } // Assert Assert.IsNull(result); Assert.IsNotNull(exception); Assert.IsInstanceOfType(exception, typeof(ArgumentNullException)); }
public void CreateBacktraceVariable() { // Arrange JObject json = SerializationTestData.GetBacktraceJsonObject(); var stackFrame = new NodeStackFrame(0); // Act var result = new NodeBacktraceVariable(stackFrame, json); // Assert Assert.IsNotNull(result); Assert.AreEqual(NodePropertyAttributes.None, result.Attributes); Assert.IsNull(result.Class); Assert.AreEqual(21, result.Id); Assert.AreEqual("v_boolean", result.Name); Assert.IsNull(result.Parent); Assert.AreEqual(stackFrame, result.StackFrame); Assert.IsNull(result.Text); Assert.AreEqual(NodePropertyType.Normal, result.Type); Assert.AreEqual("boolean", result.TypeName); Assert.AreEqual("False", result.Value); }