Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            ConsolidatedResource consolidatedResource = obj as ConsolidatedResource;

            if (consolidatedResource == null)
            {
                return(false);
            }
            if (!Equals(_resources, consolidatedResource._resources))
            {
                return(false);
            }
            if (!Equals(_lastModified, consolidatedResource._lastModified))
            {
                return(false);
            }
            if (!Equals(_contentStream, consolidatedResource._contentStream))
            {
                return(false);
            }
            return(true);
        }
        public void LastModifiedEqualsLastModifiedOfCollection()
        {
            ResourceCollection resources = new ResourceCollection();
            resources.Add(CreateResource(DateTime.Now));
            resources.Add(CreateResource(DateTime.Now.AddDays(-1)));

            ConsolidatedResource consolidated = new ConsolidatedResource(null, resources, new MemoryStream());
            Assert.That(consolidated.LastModified, Is.EqualTo(resources.LastModified()));
        }
Example #3
0
        public void LastModifiedEqualsLastModifiedOfCollection()
        {
            ResourceCollection resources = new ResourceCollection();

            resources.Add(CreateResource(DateTime.Now));
            resources.Add(CreateResource(DateTime.Now.AddDays(-1)));

            ConsolidatedResource consolidated = new ConsolidatedResource(null, resources, new MemoryStream());

            Assert.That(consolidated.LastModified, Is.EqualTo(resources.LastModified()));
        }