Beispiel #1
0
        public void TestModified()
        {
            AtomDateConstruct modifiedDate = new AtomDateConstruct();

            modifiedDate.DateTime  = DateTime.Now;
            modifiedDate.UtcOffset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Today);

            feed.Modified = modifiedDate;
            Assert.AreEqual(modifiedDate.LocalName, "modified");
            Assert.AreEqual(modifiedDate.FullName, "atom:modified");
            Assert.AreSame(feed.Modified, modifiedDate);
        }
Beispiel #2
0
        public void TestIssued()
        {
            AtomDateConstruct issuedDate = new AtomDateConstruct("issued");

            issuedDate.DateTime = DateTime.Now;

            entry.Issued = issuedDate;

            Assert.AreSame(entry.Issued, issuedDate);

            issuedDate = new AtomDateConstruct("issued");

            entry.Issued = issuedDate;

            Assert.AreEqual(issuedDate.LocalName, "issued");
            Assert.AreEqual(issuedDate.FullName, "atom:issued");
            Assert.AreSame(entry.Issued, issuedDate);
        }
Beispiel #3
0
        public void TestCreated()
        {
            AtomDateConstruct createdDate = new AtomDateConstruct("created");

            createdDate.DateTime  = DateTime.Now;
            createdDate.UtcOffset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Today);

            entry.Created = createdDate;

            Assert.AreSame(entry.Created, createdDate);

            createdDate = new AtomDateConstruct("created");

            entry.Created = createdDate;

            Assert.AreEqual(createdDate.LocalName, "created");
            Assert.AreEqual(createdDate.FullName, "atom:created");
            Assert.AreSame(entry.Created, createdDate);
        }
Beispiel #4
0
        public void TestModified()
        {
            AtomDateConstruct modifiedDate = new AtomDateConstruct(new Uri("http://purl.org/atom/ns#"));

            modifiedDate.DateTime  = DateTime.Now;
            modifiedDate.UtcOffset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Today);

            entry.Modified = modifiedDate;

            Assert.AreSame(entry.Modified, modifiedDate);

            modifiedDate = new AtomDateConstruct(new Uri("http://purl.org/atom/ns#"));

            entry.Modified = modifiedDate;

            Assert.AreEqual(modifiedDate.LocalName, "modified");
            Assert.AreEqual(modifiedDate.FullName, "atom:modified");
            Assert.AreSame(entry.Modified, modifiedDate);
        }