Skip to content

Commit

Permalink
Merge pull request #13 from kapilraajP/slalpha5
Browse files Browse the repository at this point in the history
Add display annotations and doc comments
  • Loading branch information
abeykoon authored Jun 4, 2021
2 parents ae64f56 + e959087 commit 42a6f98
Show file tree
Hide file tree
Showing 8 changed files with 331 additions and 168 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Ballerina Build
uses: ballerina-platform/ballerina-action/@master
uses: ballerina-platform/ballerina-action/@slalpha5
with:
args:
build -c
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Ballerina Build
uses: ballerina-platform/ballerina-action/@master
uses: ballerina-platform/ballerina-action/@slalpha5
with:
args:
build -c
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Ballerina Build
uses: ballerina-platform/ballerina-action/@master
uses: ballerina-platform/ballerina-action/@slalpha5
with:
args:
build -c --skip-tests
Expand All @@ -21,7 +21,7 @@ jobs:
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
- name: Ballerina Push
uses: ballerina-platform/ballerina-action/@swan-lake-connector-release
uses: ballerina-platform/ballerina-action/@slalpha5
with:
args:
push
Expand Down
2 changes: 1 addition & 1 deletion Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
org= "ballerinax"
name= "googleapis.people"
version= "0.1.1"
version= "0.1.2"
license= ["Apache-2.0"]
authors = ["Ballerina"]
keywords = ["google", "people", "contact"]
Expand Down
109 changes: 56 additions & 53 deletions endpoint.bal

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion tests/main_test.bal
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
// specific language governing permissions and limitations
// under the License.

import ballerina/lang.'float;
import ballerina/lang.runtime;
import ballerina/log;
import ballerina/os;
import ballerina/random;
import ballerina/test;

configurable string clientId = os:getEnv("CLIENT_ID");
Expand Down Expand Up @@ -77,7 +79,8 @@ function testListOtherContacts() {
@test:Config {}
function testCreateContactGroup() {
log:printInfo("Running Create Contact Group Test");
var createContactGroup = googleContactClient->createContactGroup("TestContactGroup");
string contactGroupName = genRandName();
var createContactGroup = googleContactClient->createContactGroup(contactGroupName);
if (createContactGroup is ContactGroup) {
log:printInfo(createContactGroup.toString());
contactGroupResourceName = <@untainted>createContactGroup.resourceName;
Expand Down Expand Up @@ -312,3 +315,10 @@ function afterSuite() {
}
}
}

isolated function genRandName() returns string {
float ranNumFloat = random:createDecimal()*10000000.0;
anydata ranNumInt = <int> float:round(ranNumFloat);
string contactGroupName = "TestContactGroup" + ranNumInt.toString();
return contactGroupName;
}
Loading

0 comments on commit 42a6f98

Please sign in to comment.