/// <summary> /// Constructor to set defaults values for all params /// </summary> public SimpleObjectForwarder() { IgnoreNotExists = true; EqualsSymbol = defaultEqualsSymbol; Separator = defaultSeparator; Descriptor = new Descriptor(); Details = new PropertiesDetails(); }
public void Prepare_ChecksValidData() { var noPropertySet = new PropertiesDetails(); Assert.Throws <BadCommandException>(noPropertySet.Prepare); var noComparisonSet = new PropertiesDetails(null, 1000, 1000); Assert.Throws <BadCommandException>(noComparisonSet.Prepare); var badComparisonSet = new PropertiesDetails("Xor", 1000, 1000); Assert.Throws <BadCommandException>(badComparisonSet.Prepare); }
public void FileMatches_YieldsNegative(string comp, int weight, int size, int fileWeight, int fileWidth, int fileHeight) { var details = new PropertiesDetails(comp, weight, size); details.Prepare(); var file = Substitute.For <IFileWrapper>(); file.GetWidth().Returns(fileWidth); file.GetHeight().Returns(fileHeight); file.GetWeightInKb().Returns(fileWeight); Assert.False(details.FileMatches(file)); }
public FilePropertiesPredicate([NotNull] PropertiesDetails details) { _details = details; }
public void Prepare_ComparisonAintTooStrict(string comparison) { var comparisonSet = new PropertiesDetails(comparison, 100, 100); Assert.DoesNotThrow(comparisonSet.Prepare); }