Skip to content

Commit

Permalink
test(create-account-validation-test): add tests for inequality
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTexanCodeur committed May 27, 2024
1 parent 2fe86ff commit b083402
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions test/models/ui/validation/create_account_validation_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,55 @@ void main() {
);

expect(createAccount, createAccountCopy);
expect(createAccount == createAccountCopy, true);
});

test("equality fails on different uniqueUsernameError", () {
const createAccount = CreateAccountValidation(
uniqueUsernameError: "uniqueUsernameError",
pseudoError: "pseudoError",
accountCreated: true,
);

const createAccountCopy = CreateAccountValidation(
uniqueUsernameError: "uniqueUsernameError2",
pseudoError: "pseudoError",
accountCreated: true,
);

expect(createAccount == createAccountCopy, false);
});

test("equality fails on different pseudoError", () {
const createAccount = CreateAccountValidation(
uniqueUsernameError: "uniqueUsernameError",
pseudoError: "pseudoError",
accountCreated: true,
);

const createAccountCopy = CreateAccountValidation(
uniqueUsernameError: "uniqueUsernameError",
pseudoError: "pseudoError2",
accountCreated: true,
);

expect(createAccount == createAccountCopy, false);
});

test("equality fails on different accountCreated", () {
const createAccount = CreateAccountValidation(
uniqueUsernameError: "uniqueUsernameError",
pseudoError: "pseudoError",
accountCreated: true,
);

const createAccountCopy = CreateAccountValidation(
uniqueUsernameError: "uniqueUsernameError",
pseudoError: "pseudoError",
accountCreated: false,
);

expect(createAccount == createAccountCopy, false);
});
});
}

0 comments on commit b083402

Please sign in to comment.