krisp-test-assertions

Krisp Test Assertions

version 1.0.0 (Compatible with OutSystems 11)
Published on 26 July 2020 by 
0.0
 (0 ratings)
krisp-test-assertions

Krisp Test Assertions

Documentation

Includes 79 assertion actions to aid in unit testing server actions.

When an assertion action is called and the assertion is not True, an exception is thrown.

Each assertion action requires the following inputs

  • Name (Text) The name of the value being tested, eg "Customer.Name"
  • ExpectedValue (Type differs) The value the test expects to find
  • Value (Same as expected value) The actual value returned by the action being tested
  • Message (Text) An optional additional message to throw in the exception.


The exception message will be somewhat like the following depending on the particular assertion:

Name + " does not match the expected value "EXPECTED VALUE", but is "VALUE".


Contents

  • Actions
  • Team Membership Agreement


Actions

This plugin exposes the following actions.


ThrowTestFailed(Message: Text)

Assert_BooleanEqual(Name: Text, ExpectedValue: Boolean, Value: Boolean, Message: Text)

Assert_CurrencyEqual(Name: Text, ExpectedValue: Decimal, Value: Decimal, Message: Text)

Assert_CurrencyGreaterThan(Name: Text, ExpectedValue: Decimal, Value: Decimal, Message: Text)

Assert_CurrencyGreaterThanOrEqual(Name: Text, ExpectedValue: Decimal, Value: Decimal, Message: Text)

Assert_CurrencyInRange(Name: Text, ExpectedMin: Decimal, ExpectedMax: Decimal, Value: Decimal, Message: Text)

Assert_CurrencyLessThan(Name: Text, ExpectedValue: Decimal, Value: Decimal, Message: Text)

Assert_CurrencyLessThanOrEqual(Name: Text, ExpectedValue: Decimal, Value: Decimal, Message: Text)

Assert_CurrencyNotInRange(Name: Text, ExpectedMin: Decimal, ExpectedMax: Decimal, Value: Decimal, Message: Text)

Assert_DateEqual(Name: Text, ExpectedValue: DateTime, Value: DateTime, Message: Text)

Assert_DateGreaterThan(Name: Text, ExpectedValue: DateTime, Value: DateTime, Message: Text)

Assert_DateGreaterThanOrEqual(Name: Text, ExpectedValue: DateTime, Value: DateTime, Message: Text)

Assert_DateInRange(Name: Text, ExpectedMin: DateTime, ExpectedMax: DateTime, Value: DateTime, Message: Text)

Assert_DateLessThan(Name: Text, ExpectedValue: DateTime, Value: DateTime, Message: Text)

Assert_DateLessThanOrEqual(Name: Text, ExpectedValue: DateTime, Value: DateTime, Message: Text)

Assert_DateNotInRange(Name: Text, ExpectedMin: DateTime, ExpectedMax: DateTime, Value: DateTime, Message: Text)

Assert_DateTimeEqual(Name: Text, ExpectedValue: DateTime, Value: DateTime, Message: Text)

Assert_DateTimeGreaterThan(Name: Text, ExpectedValue: DateTime, Value: DateTime, Message: Text)

Assert_DateTimeGreaterThanOrEqual(Name: Text, ExpectedValue: DateTime, Value: DateTime, Message: Text)

Assert_DateTimeInRange(Name: Text, ExpectedMin: DateTime, ExpectedMax: DateTime, Value: DateTime, Message: Text)

Assert_DateTimeLessThan(Name: Text, ExpectedValue: DateTime, Value: DateTime, Message: Text)

Assert_DateTimeLessThanOrEqual(Name: Text, ExpectedValue: DateTime, Value: DateTime, Message: Text)

Assert_DateTimeNotInRange(Name: Text, ExpectedMin: DateTime, ExpectedMax: DateTime, Value: DateTime, Message: Text)

Assert_DecimalEqual(Name: Text, ExpectedValue: Decimal, Value: Decimal, Message: Text)

Assert_DecimalGreaterThan(Name: Text, ExpectedValue: Decimal, Value: Decimal, Message: Text)

Assert_DecimalGreaterThanOrEqual(Name: Text, ExpectedValue: Decimal, Value: Decimal, Message: Text)

Assert_DecimalInRange(Name: Text, ExpectedMin: Decimal, ExpectedMax: Decimal, Value: Decimal, Message: Text)

Assert_DecimalLessThan(Name: Text, ExpectedValue: Decimal, Value: Decimal, Message: Text)

Assert_DecimalLessThanOrEqual(Name: Text, ExpectedValue: Decimal, Value: Decimal, Message: Text)

Assert_DecimalNotInRange(Name: Text, ExpectedMin: Decimal, ExpectedMax: Decimal, Value: Decimal, Message: Text)

Assert_EmailContains(Name: Text, ExpectedValue: Text, Value: Text, IsCaseSensitive: Boolean, Message: Text)

Assert_EmailDoesNotContain(Name: Text, ExpectedValue: Text, Value: Text, IsCaseSensitive: Boolean, Message: Text)

Assert_EmailEmpty(Name: Text, Value: Text, Message: Text)

Assert_EmailEqual(Name: Text, ExpectedValue: Text, Value: Text, Message: Text)

Assert_EmailNotEmpty(Name: Text, Value: Text, Message: Text)

Assert_False(Name: Text, Value: Boolean, Message: Text)

Assert_IdEqual(Name: Text, ExpectedValue: Long Integer, Value: Long Integer, Message: Text)

Assert_IntEqual(Name: Text, ExpectedValue: int, Value: int, Message: Text)

Assert_IntGreaterThan(Name: Text, ExpectedValue: Integer, Value: Integer, Message: Text)

Assert_IntGreaterThanOrEqual(Name: Text, ExpectedValue: Integer, Value: Integer, Message: Text)

Assert_IntInRange(Name: Text, ExpectedMin: Integer, ExpectedMax: Integer, Value: Integer, Message: Text)

Assert_IntLessThan(Name: Text, ExpectedValue: Integer, Value: Integer, Message: Text)

Assert_IntLessThanOrEqual(Name: Text, ExpectedValue: Integer, Value: Integer, Message: Text)

Assert_IntNotInRange(Name: Text, ExpectedMin: Integer, ExpectedMax: Integer, Value: Integer, Message: Text)

Assert_LongIntEqual(Name: Text, ExpectedValue: Long Integer, Value: Long Integer, Message: Text)

Assert_LongIntGreaterThan(Name: Text, ExpectedValue: Long Integer, Value: Long Integer, Message: Text)

Assert_LongIntGreaterThanOrEqual(Name: Text, ExpectedValue: Long Integer, Value: Long Integer, Message: Text)

Assert_LongIntInRange(Name: Text, ExpectedMin: Long Integer, ExpectedMax: Long Integer, Value: Long Integer, Message: Text)

Assert_LongIntLessThan(Name: Text, ExpectedValue: Long Integer, Value: Long Integer, Message: Text)

Assert_LongIntLessThanOrEqual(Name: Text, ExpectedValue: Long Integer, Value: Long Integer, Message: Text)

Assert_LongIntNotInRange(Name: Text, ExpectedMin: Long Integer, ExpectedMax: Long Integer, Value: Long Integer, Message: Text)

Assert_PhoneContains(Name: Text, ExpectedValue: Text, Value: Text, IsCaseSensitive: Boolean, Message: Text)

Assert_PhoneDoesNotContain(Name: Text, ExpectedValue: Text, Value: Text, IsCaseSensitive: Boolean, Message: Text)

Assert_PhoneEmpty(Name: Text, Value: Text, Message: Text)

Assert_PhoneEqual(Name: Text, ExpectedValue: Text, Value: Text, Message: Text)

Assert_PhoneNotEmpty(Name: Text, Value: Text, Message: Text)

Assert_TextContainedBy(Name: Text, ExpectedValue: Text, Value: Text, IsCaseSensitive: Boolean, Message: Text)

Assert_TextContains(Name: Text, ExpectedValue: Text, Value: Text, IsCaseSensitive: Boolean, Message: Text)

Assert_TextDoesNotContain(Name: Text, ExpectedValue: Text, Value: Text, IsCaseSensitive: Boolean, Message: Text)

Assert_TextEmpty(Name: Text, Value: Text, Message: Text)

Assert_TextEqual(Name: Text, ExpectedValue: Text, Value: Text, IsCaseSensitive: Boolean, Message: Text)

Assert_TextMatch(Name: Text, ExpectedPattern: Text, Value: Text, IsCaseSensitive: Boolean, Message: Text)

Assert_TextNotContainedBy(Name: Text, ExpectedValue: Text, Value: Text, IsCaseSensitive: Boolean, Message: Text)

Assert_TextNotEmpty(Name: Text, Value: Text, Message: Text)

Assert_TextNotEqual(Name: Text, ExpectedValue: Text, Value: Text, IsCaseSensitive: Boolean, Message: Text)

Assert_TextNotMatch(Name: Text, ExpectedPattern: Text, Value: Text, IsCaseSensitive: Boolean, Message: Text)

Assert_TimeEqual(Name: Text, ExpectedValue: DateTime, Value: DateTime, Message: Text)

Assert_TimeGreaterThan(Name: Text, ExpectedValue: DateTime, Value: DateTime, Message: Text)

Assert_TimeGreaterThanOrEqual(Name: Text, ExpectedValue: DateTime, Value: DateTime, Message: Text)

Assert_TimeInRange(Name: Text, ExpectedMin: DateTime, ExpectedMax: DateTime, Value: DateTime, Message: Text)

Assert_TimeLessThan(Name: Text, ExpectedValue: DateTime, Value: DateTime, Message: Text)

Assert_TimeLessThanOrEqual(Name: Text, ExpectedValue: DateTime, Value: DateTime, Message: Text)

Assert_TimeNotInRange(Name: Text, ExpectedMin: DateTime, ExpectedMax: DateTime, Value: DateTime, Message: Text)

Assert_True(Name: Text, Value: Boolean, Message: Text)

ListAssert_IntContains(Name: Text, Values: Int List, ExpectedValue: Integer, Message: Text)

ListAssert_IntDoesNotContain(Name: Text, Values: Int List, ExpectedValue: Integer, Message: Text)

ListAssert_LongIntContains(Name: Text, Values: Long List, ExpectedValue: Long Integer, Message: Text)

ListAssert_LongIntDoesNotContain(Name: Text, Values: Long List, ExpectedValue: Long Integer, Message: Text)

ListAssert_TextContains(Name: Text, Values: Text List, ExpectedValue: Text, IsCaseSensitive: Boolean, Message: Text)

ListAssert_TextDoesNotContain(Name: Text, Values: Text List, ExpectedValue: Text, IsCaseSensitive: Boolean, Message: Text)



Team Membership Agreement

As a member of this team, I agree to abide by the following rules:

  • All communication between developers and users is polite, constructive and in good faith,
  • New features are listed on the roadmap (in plugin documentation) and announced to the team before work begins,
  • Any disagreements about a feature must be resolved before a change is published,
  • New features in extensions are unit tested in the extension,
  • New versions are tested by the developer before being published,
  • New versions are published in "Under Development" status until a team member has given it a successful test before being changed to "Stable",
  • Any new teams members must agree to the ground rules.  If a team member is not able to follow the ground rules, they must leave the team.