As Daniel mentioned, you need to make the property virtual.
Next, as soon as NameValueCollection indexer is not virtual, Moq
cannot mock it so it's not possible to mock it in a way you want.
However, getter/setter of NameValueCollection ARE virtual, so you can
use that:
var foo = new Mock<Foo>();
foo.Setup(x => x.AppSettings.Get("foo")).Returns("bar");
Assert.Equal("bar", foo.Object.AppSettings.Get("foo"));
(Note, that starting from Moq 3.0 "Expect" is is renamed to "Setup")
Or, as Daniel suggested, you can mock the whole collection, not just
one key/value.