public void ReturnsTrueWhenFileBytesAreHigherOrEqual_DecimalSize() { var fileModel = new MockFileInfo(bytes: 512); var checker = new SizeArchiveNecessityChecker(fileModel, 0.5, MemoryUnit.KB); var haveToArchive = checker.HaveToArchive(); Assert.IsTrue(haveToArchive); }
public void ReturnsFalseWhenFileBytesAreSmaller_DecimalSize() { var fileModel = new MockFileInfo(bytes: 511); var checker = new SizeArchiveNecessityChecker(fileModel, 0.5, MemoryUnit.KB); var haveToArchive = checker.HaveToArchive(); Assert.IsFalse(haveToArchive); }
public void ReturnsFalseWhenFileBytesAreSmaller() { foreach (var value in System.Enum.GetValues(typeof(MemoryUnit))) { var fileModel = new MockFileInfo(bytes: (int)value - 1); var checker = new SizeArchiveNecessityChecker(fileModel, 1, (MemoryUnit)value); var haveToArchive = checker.HaveToArchive(); Assert.IsFalse(haveToArchive); } }