public async Task DeclareVariableAsync() { RemoteValueFake remoteValue = RemoteValueFakeUtil.CreateSimpleChar("testVar", 'c'); RemoteValueFake createdValue = RemoteValueFakeUtil.CreateSimpleInt("$test", 22); remoteValue.AddValueFromExpression("auto $test=var1+var2; $test", createdValue); remoteValue.AddValueFromExpression("$test", createdValue); var natvisScope = new NatvisScope(); natvisScope.AddScopedName("test", "$test"); IVariableInformation varInfo = _varInfoFactory.Create(remoteValue); await _evaluator.DeclareVariableAsync(varInfo, "test", "var1+var2", natvisScope); Assert.That(natvisScope.ContextVariables, Does.ContainKey("$test")); Assert.That(natvisScope.ContextVariables["$test"], Is.EqualTo(createdValue)); }