-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #239 from lyskouski/RF-228
[#228] [RF] Improve Cove Coverage
- Loading branch information
Showing
22 changed files
with
292 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
% Copyright 2023 The terCAD team. All rights reserved. | ||
% Use of this content is governed by a CC BY-NC-ND 4.0 license that can be found in the LICENSE file. | ||
|
||
\subsection{Dart} | ||
\markboth{Bootcamping}{Dart} | ||
|
||
\subsubsection{Overloading operators} | ||
|
||
In Dart, "magic methods" are often referred to as "operator overloading" or "special methods." They allow you to define | ||
custom behaviors for built-in operations: | ||
|
||
\begin{itemize} | ||
\item \q{toString} returns a string representation of an object, can be used for a serialization and deserialization | ||
process of an object; | ||
\item \q{call} allows an object to be treated as a function; | ||
\item \q{hashCode} returns a hash code for an object (to use object as a key for \q{Map} and \q{Set}); | ||
\item \q{operator==} compares two objects for equality; | ||
\item \q{get} and \q{set} -- to override the behavior of getting and setting properties. | ||
\end{itemize} | ||
|
||
\begin{lstlisting} | ||
class Person { | ||
// Required from constructor | ||
String name; | ||
// Post-initialization | ||
late DateTime _createdAt = DateTime.now(); | ||
// var person = Person('Tom'); | ||
Person(this.name); | ||
// person() // 'Hello from Tom!' | ||
String call() => 'Hello from $name!'; | ||
// person.createdAt = DateTime(2023, 01, 01); | ||
set createdAt(DateTime date) => _createdAt = date; | ||
// print(person.createdAt); // 2023-01-01 00:00:00 | ||
DateTime get createdAt => _createdAt; | ||
// print(Person('Tom') == Person('Terry')); // false | ||
@override | ||
bool operator ==(Person other) => other.name == name; | ||
// person = Person.fromString('Tom'); | ||
factory Person.fromString(String name) { | ||
return Person(name); | ||
} | ||
// print(person); // 'Tom' | ||
@override | ||
String toString() => name; | ||
} | ||
\end{lstlisting} |
2 changes: 2 additions & 0 deletions
2
...mentation-flow/ch00-s01-dart.tex-dump.tex → ...mentation-flow/ch01-s01-dart.tex-dump.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
@account @currency | ||
@account | ||
Feature: Verify Account functionality alignment with expectations | ||
|
||
Scenario: Opened Account Form | ||
Given I am on "Accounts" page | ||
When I tap "Add Account" button | ||
Then I can see "Create new Account" component | ||
|
||
Scenario: Opened Budget Form | ||
Given I am on "Budgets" page | ||
When I tap "Add new Budget Category" button | ||
Then I can see "Create new Budget Category" component |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
@budget @currency | ||
Feature: Verify Budget Functionality | ||
|
||
Scenario Outline: Created different Budget types | ||
Given Opened Budget Form | ||
When I enter "<name>" to "Enter Budget Category Name" text field | ||
And I enter "<amount>" to "Set Balance" text field | ||
And I tap on 0 index of "CurrencySelector" fields | ||
And I enter "<currency>" to "Type Code" text field | ||
And I tap on 1 index of "<currency>" element | ||
And I tap "Close" element # Popup with icons | ||
And I tap "Create new Budget Category" button | ||
Then I can see "Budgets, left" component | ||
And I can see "<name_result>" component | ||
And I can see "<result>" component | ||
|
||
Examples: | ||
| name | amount | currency | result | name_result | | ||
| Limited | 100 | EUR | €100.00 left | Limited | | ||
| Unlimited | 0 | USD | $0.00 spent | Unlimited | | ||
| Group / 1 | 50 | USD | $50.00 left | Group / 1 | | ||
| Group / 2 | 75 | USD | €0.00 / €125.00 | Group | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
@budget | ||
Feature: Verify Budget functionality alignment with expectations | ||
|
||
Scenario: Opened Budget Form | ||
Given I am on "Budgets" page | ||
When I tap "Add new Budget Category" button | ||
Then I can see "Create new Budget Category" component |
Oops, something went wrong.