コード例 #1
0
        public void ReplacePlaceholder_WithNonformattedValue()
        {
            UserBankSection userBankSection = TestUtilities.GetSection <UserBankSection>("UserBankSettings");
            DisplayElement  display         = userBankSection.Account.Display;

            string expected = "Your account was created on Five Years Ago";

            Assert.AreEqual(expected, display.MissingDateValue);
        }
コード例 #2
0
        public void ReplacePlaceholder_WithPropertyCollision()
        {
            UserBankSection userBankSection = TestUtilities.GetSection <UserBankSection>("UserBankSettings");
            DisplayElement  display         = userBankSection.Account.Display;

            string expected = "Your account name is MY ACCOUNT.";

            Assert.AreEqual(expected, display.Name);
        }
コード例 #3
0
        public void ReplacePlaceholder_WithFormattedDate()
        {
            UserBankSection userBankSection = TestUtilities.GetSection <UserBankSection>("UserBankSettings");
            DisplayElement  display         = userBankSection.Account.Display;

            Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");

            string expected = "Your account expires on 10 January 2000.";

            Assert.AreEqual(expected, display.Update);
        }
コード例 #4
0
        public void ReplacePlaceholder_WithFormattedNumber()
        {
            UserBankSection userBankSection = TestUtilities.GetSection <UserBankSection>("UserBankSettings");
            DisplayElement  display         = userBankSection.Account.Display;

            Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");

            string expected = "Your account balance is $ 10,200.00.";

            Assert.AreEqual(expected, display.State);
        }