public void TestTextureModelDuplicates_FilesAreNotDuplicates() { // Arrange TextureModel modelA = new TextureModel(@"C:\test\test2\hienokuva1.png"); TextureModel modelB = new TextureModel(@"C:\test\test2\hienokuva2.tga"); ICompareCondition <TextureModel> comparer = new HasSamePathAndFileNameCompareCondition(); // Act bool isDuplicate = comparer.IsDuplicate(modelA, modelB); // Assert Assert.IsFalse(isDuplicate, "The files were considered as duplicates when they should NOT!"); }
public void TestGetLessImportantDuplicate_BothAreImportant() { // Arrange TextureModel modelA = new TextureModel(@"C:\test\test2\hienokuva1.png"); TextureModel modelB = new TextureModel(@"C:\test\test2\hienokuva2.png"); ICompareCondition <TextureModel> comparer = new HasSamePathAndFileNameCompareCondition(); // Act TextureModel duplicateModel = comparer.GetLessImportantDuplicate(modelA, modelB); // Assert Assert.IsNull(duplicateModel, "Duplicate model was NOT null!"); }
public void TestTextureModelDuplicates_OtherFileIsNull() { // Arrange TextureModel model1 = new TextureModel(@"C:\test\test2\hienokuva1.png"); TextureModel model2 = null; ICompareCondition <TextureModel> comparer = new HasSamePathAndFileNameCompareCondition(); // Act bool isDuplicate = comparer.IsDuplicate(model1, model2); // Assert Assert.IsFalse(isDuplicate, "The files were considered as duplicates when the other file was null!"); }