public void BoolValues(bool value) { var remoteValue = RemoteValueFakeUtil.CreateSimpleBool("myVar", value); var varInfo = varInfoBuilder.Create(remoteValue); Assert.That(varInfo.IsTruthy, Is.EqualTo(value)); }
public async Task ClassMemberAccessAsync() { RemoteValueFake remoteValue = RemoteValueFakeUtil.CreateClass("MyType", "myType", ""); remoteValue.AddChild(RemoteValueFakeUtil.CreateSimpleBool("value1", true)); remoteValue.AddChild(RemoteValueFakeUtil.CreateSimpleInt("value2", 22)); IVariableInformation varInfo = _varInfoFactory.Create(remoteValue); IVariableInformation exprVarInfo = await _evaluator.EvaluateExpressionAsync( "value1", varInfo, new NatvisScope(), null); Assert.That(exprVarInfo.DisplayName, Is.EqualTo("value1")); Assert.That(await exprVarInfo.ValueAsync(), Is.EqualTo("true")); }
void SetupLocalAndArguments() { var local1 = RemoteValueFakeUtil.CreateSimpleInt("value1", 5); var local2 = RemoteValueFakeUtil.CreateSimpleInt("value2", 7); var arg1 = RemoteValueFakeUtil.CreateSimpleInt("intVal", 5); var arg2 = RemoteValueFakeUtil.CreateSimpleBool("boolVal", true); _mockRemoteFrame.GetVariables(false, true, false, true).Returns( new List <RemoteValue> { local1, local2 }); _mockRemoteFrame.GetVariables(true, false, false, true).Returns( new List <RemoteValue> { arg1, arg2 }); _mockRemoteFrame.GetVariables(true, true, false, true).Returns( new List <RemoteValue> { arg1, arg2, local1, local2 }); }