public void ClassifyNoOldFileShouldReturnAddedTest() { var mc = new ModificationClassificator(); var input = new InfoPair() { NewFileHash = "asdf", OldFileHash = null }; var result = mc.Classify(input); Assert.IsTrue(result.Modification == EFileModification.Added); }
public void ClassifyBothFilesAndSameHashShouldReturnNoChange() { var mc = new ModificationClassificator(); const string sameHash = "asdf"; var input = new InfoPair() { NewFileHash = sameHash, OldFileHash = sameHash }; var result = mc.Classify(input); Assert.IsTrue(result.Modification == EFileModification.NoChange); }
public void ClassifyBothFilesAndDifferentHashShouldReturnNoChange() { var mc = new ModificationClassificator(); const string hash = "asdf"; const string differentHash = "fdsa"; var input = new InfoPair() { NewFileHash = hash, OldFileHash = differentHash }; var result = mc.Classify(input); Assert.IsTrue(result.Modification == EFileModification.Modified); }