Пример #1
0
        public void DefaultFormat()
        {
            var obj = new SDtest();

            Assert.AreEqual("", obj.TextDate, "Should be empty");

            var now = DateTime.Now;

            obj.TextDate = string.Format("{0:g}", now);
            Assert.AreEqual(string.Format("{0:g}", now), obj.TextDate, "Should be today");
        }
Пример #2
0
        public void DefaultFormat()
        {
            IDataPortal <SDtest> dataPortal = _testDIContext.CreateDataPortal <SDtest>();

            TestResults.Reinitialise();

            var obj = SDtest.NewSDTest(dataPortal);

            Assert.AreEqual("", obj.TextDate, "Should be empty");

            var now = DateTime.Now;

            obj.TextDate = string.Format("{0:g}", now);
            Assert.AreEqual(string.Format("{0:g}", now), obj.TextDate, "Should be today");
        }