Skip to content

Instantly share code, notes, and snippets.

View ashenwgt's full-sized avatar
🎧

Thilina Ashen Gamage ashenwgt

🎧
View GitHub Profile
@ashenwgt
ashenwgt / my-view1.html
Created November 4, 2017 04:52
src/my-view1.html
<link rel="import" href="shared-styles.html">
<link rel="import" href="../bower_components/vaadin-grid/vaadin-grid.html">
<link rel="import" href="../bower_components/iron-ajax/iron-ajax.html">
<link rel="import" href="../bower_components/paper-checkbox/paper-checkbox.html">
<dom-module id="my-view1">
<template is="dom-bind">
<style include="shared-styles">
:host {
@ashenwgt
ashenwgt / HelloLogBack.java
Created July 31, 2017 06:41
Logback - HelloLogBack.java (Dynamically change name)
package com.ashenlive;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class HelloLogBack {
static Logger LOG = LoggerFactory.getLogger(HelloLogBack.class);
public static void main(String[] args) {
for(int i = 1; i <= 800; i++) {
@ashenwgt
ashenwgt / StartupSizeTimeBasedTriggeringPolicy.java
Created July 31, 2017 06:09
Logback - StartupSizeTimeBasedTriggeringPolicy.java
package com.ashenlive;
import ch.qos.logback.core.joran.spi.NoAutoStart;
import ch.qos.logback.core.rolling.RolloverFailure;
import ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP;
@NoAutoStart
public class StartupSizeTimeBasedTriggeringPolicy<E> extends SizeAndTimeBasedFNATP<E> {
@Override
@ashenwgt
ashenwgt / logback.xml
Created July 31, 2017 05:24
Logback - logback.xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<logger name="com.ashenlive" level="ALL"/>
<!-- Console Appender -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>%d{yyyy.MM.dd HH:mm:ss.SSS} [%thread] %highlight(%-5level) %cyan(%logger{36}:%L) - %msg%n</pattern>
</layout>
<withJansi>true</withJansi>
@ashenwgt
ashenwgt / HelloLogBack.java
Created July 31, 2017 04:31
Logback - HelloLogBack.java
package com.ashenlive;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class HelloLogBack {
static Logger LOG = LoggerFactory.getLogger(HelloLogBack.class);
public static void main(String[] args) {
for(int i = 1; i <= 800; i++) {
@ashenwgt
ashenwgt / pom.xml
Created July 30, 2017 18:18
Logback - pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ashenlive</groupId>
<artifactId>HelloLogBack</artifactId>
<version>1.0-SNAPSHOT</version>
@ashenwgt
ashenwgt / ServiceHooks.java
Last active August 23, 2017 17:39
Cucumber BDD - ServiceHooks.java
package stepdefs;
import cucumber.api.Scenario;
import cucumber.api.java.After;
import cucumber.api.java.Before;
/**
* Created by thilinaga on 7/3/2017.
*/
public class ServiceHooks {
@ashenwgt
ashenwgt / StepDefinitions.java
Last active August 23, 2017 17:39
Cucumber BDD - StepDefinitions.java
package stepdefs;
import cucumber.api.PendingException;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
/**
* Created by thilinaga on 7/3/2017.
*/
@ashenwgt
ashenwgt / TestRunner.java
Last active August 23, 2017 17:37
Cucumber BDD - TestRunner.java
/**
* Created by thilinaga on 7/3/2017.
*/
import cucumber.api.CucumberOptions;
import cucumber.api.testng.TestNGCucumberRunner;
import cucumber.api.testng.CucumberFeatureWrapper;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
@ashenwgt
ashenwgt / UpdateProfile.feature
Created July 8, 2017 16:23
Cucumber BDD - UpdateProfile.feature
@UpdateProfile
Feature: Update Profile
As an employee of the company
I want to be able to update my name, projects, email, and phone numbers on my profile
In order to share my contact information with my colleagues
Background: User logs in to profile
Given I am on the "Company home" page on URL "www.mycomany.com"
When I fill in "Username" with "Test"
And I fill in "Password" with "123"