private static FileMonitorInformation CreateFileMonitorInformation() { var fileMonitorInformation = new FileMonitorInformation { KataHash = Guid.NewGuid().ToString(), OldKataHash = Guid.NewGuid().ToString(), OldPlayerHash = Guid.NewGuid().ToString(), PlayerHash = Guid.NewGuid().ToString() }; return(fileMonitorInformation); }
public void AreThereChanges_GivenOldKataHashIsNull_ShouldReturnTrue() { //---------------Set up test pack------------------- var fileMonitorInformation = new FileMonitorInformation { OldKataHash = null }; //---------------Assert Precondition---------------- //---------------Execute Test ---------------------- var areThereChanges = fileMonitorInformation.AreThereChanges(); //---------------Test Result ----------------------- Assert.IsTrue(areThereChanges); }
public void AreThereChanges_GivenOldPlayerHashIsNotEqualToPlayerHash_ShouldReturnTrue() { //---------------Set up test pack------------------- var fileMonitorInformation = new FileMonitorInformation { OldPlayerHash = "old hash", PlayerHash = "new hash" }; //---------------Assert Precondition---------------- //---------------Execute Test ---------------------- var areThereChanges = fileMonitorInformation.AreThereChanges(); //---------------Test Result ----------------------- Assert.IsTrue(areThereChanges); }
public void AreThereChanges_GivenOldKataHashIsEqualToKataHash_AndOldPlayerHashIsEqualToPlayerHash_ShouldReturnFalse() { //---------------Set up test pack------------------- var fileMonitorInformation = new FileMonitorInformation { OldKataHash = "kata hash", KataHash = "kata hash", OldPlayerHash = "old player", PlayerHash = "old player" }; //---------------Assert Precondition---------------- //---------------Execute Test ---------------------- var areThereChanges = fileMonitorInformation.AreThereChanges(); //---------------Test Result ----------------------- Assert.IsFalse(areThereChanges); }
public void UpdateSettings(FileMonitorInformation fileHashes) { _theSettings.KataHash = fileHashes.KataHash; _theSettings.PlayerHash = fileHashes.PlayerHash; }