Пример #1
0
        public void ResourceProxy_should_use_result_from_translate_func()
        {
            var proxy = new ResourcesProxy(text =>
            {
                _output.WriteLine(text);
                return("lala");
            });

            proxy.Command_help_description.Should().Be("lala");
            proxy.Parse_Assigning_value_to_argument("a", "b").Should().Be("lala");
        }
Пример #2
0
        public void ResourceProxy_uses_base_when_translate_func_returns_null()
        {
            var proxy = new ResourcesProxy(text =>
            {
                _output.WriteLine(text);
                return(null);
            });
            var resources = new Resources();

            proxy.Command_help_description.Should().Be(resources.Command_help_description);
            proxy.Parse_Assigning_value_to_argument("a", "b")
            .Should().Be(resources.Parse_Assigning_value_to_argument("a", "b"));
        }