Пример #1
0
        public void Test_NullFromat()
        {
            var value = _fixture.Create <string>();
            var text  = TextBuilderHelper.GetText(_currentCulture, null, value);

            text.ShouldBeEquivalentTo(value);
        }
Пример #2
0
        public void Test_GetText()
        {
            var value = _fixture.Create <string>();
            var text  = TextBuilderHelper.GetText(_currentCulture, "Text: {0}.", value);

            text.ShouldBeEquivalentTo("Text: " + value + ".");
        }
Пример #3
0
        public void Test_BadFromat()
        {
            var          value  = _fixture.Create <string>();
            const string format = "Text: {0.";
            var          text   = TextBuilderHelper.GetText(_currentCulture, format, value);

            text.ShouldBeEquivalentTo(format + value);
        }
Пример #4
0
        public void Test_NullValue()
        {
            var text = TextBuilderHelper.GetText(_currentCulture, _fixture.Create <string>(), null);

            text.ShouldBeEquivalentTo(string.Empty);
        }