public void ConvertEmptyImageFileIndexStructureReturnsEmptyModel() { var imageFile = new ImageFileIndexStructure(); var model = new TileTableModel(imageFile); Assert.IsTrue(String.IsNullOrEmpty(model.Id)); Assert.IsTrue(String.IsNullOrEmpty(model.FileName)); Assert.IsTrue(String.IsNullOrEmpty(model.FilePath)); Assert.IsTrue(String.IsNullOrEmpty(model.AverageColour)); Assert.IsTrue(String.IsNullOrEmpty(model.LastWriteTime)); }
public void ConvertImageFileIndexStructureConvertEmptyAverageWholeToBlackHex() { var imageFile = new ImageFileIndexStructure() { Id = ObjectId.GenerateNewId().ToString(), FileName = "FileName", FilePath = "FilePath\\FileName.png", LastWriteTime = DateTime.Now.ToString(), Data = new Metadata() { } }; var model = new TileTableModel(imageFile); Assert.AreEqual(Color.Black.ToHex(), model.AverageColour); }