コード例 #1
0
        public void CopyFrom_Trim()
        {
            var source = new EnglishTranslatedString();
            var target = new EnglishTranslatedStringContract {
                Original = " "
            };

            var changed = source.CopyFrom(target);

            Assert.IsFalse(changed, "changed");
            Assert.AreEqual(string.Empty, source.Original, "Original");
        }
コード例 #2
0
        public void CopyFrom_Trim()
        {
            var source = new EnglishTranslatedString();
            var target = new EnglishTranslatedStringContract {
                Original = " "
            };

            var changed = source.CopyFrom(target);

            changed.Should().BeFalse("changed");
            source.Original.Should().Be(string.Empty, "Original");
        }
コード例 #3
0
        public void CopyFrom_Changed()
        {
            var source = new EnglishTranslatedString("ミク", "Miku");
            var target = new EnglishTranslatedStringContract {
                Original = "ミクさんマジ天使", English = "Hatsune Miku is truly my angel"
            };

            var changed = source.CopyFrom(target);

            Assert.IsTrue(changed, "changed");
            Assert.AreEqual("ミクさんマジ天使", source.Original, "Original");
        }
コード例 #4
0
        public void CopyFrom_Changed()
        {
            var source = new EnglishTranslatedString("ミク", "Miku");
            var target = new EnglishTranslatedStringContract {
                Original = "ミクさんマジ天使", English = "Hatsune Miku is truly my angel"
            };

            var changed = source.CopyFrom(target);

            changed.Should().BeTrue("changed");
            source.Original.Should().Be("ミクさんマジ天使", "Original");
        }