Пример #1
0
        public void When_edited_file_modification_date_changes()
        {
            // Arrange
            File         file           = new ExampleFileFactory().CreateFile();
            const string newFileName    = "otherName";
            const string newDescription = "otherDescription";
            DateTime     dateModified   = file.DateCreated + TimeSpan.FromHours(1);

            // Act
            file.Edit(newFileName, newDescription, dateModified);

            // Assert
            Assert.AreEqual(dateModified, file.DateModified);
        }
Пример #2
0
        public void When_edited_file_name_and_description_change()
        {
            // Arrange
            File         file           = new ExampleFileFactory().CreateFile();
            const string newFileName    = "otherName";
            const string newDescription = "otherDescription";

            // Act
            file.Edit(newFileName, newDescription, file.DateCreated + TimeSpan.FromHours(1));

            // Assert
            Assert.AreEqual(newFileName, file.FileName);
            Assert.AreEqual(newDescription, file.Description);
        }