public void returns_string_from_resource_if_exists() { string request = "test-resource"; string response = "Translated test resource"; var resourceSource = new Mock <IResourceSource>(); resourceSource.Setup(x => x.Retrieve(It.Is <string>(y => y == request))).Returns(response); _resourceProvider.AddSource(Thread.CurrentThread.CurrentUICulture.Name, resourceSource.Object); string result = _resourceProvider.Retrieve(request) as string; Assert.AreEqual(response, result); }