Skip to content

Commit

Permalink
Stash commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Reiche committed Jan 20, 2022
1 parent 9314cfb commit 4ca6e90
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Testerra
*
* (C) 2020, Mike Reiche, T-Systems Multimedia Solutions GmbH, Deutsche Telekom AG
* (C) 2021, Mike Reiche, T-Systems MMS GmbH, Deutsche Telekom AG
*
* Deutsche Telekom AG and all other contributors /
* copyright owners license this file to you under the Apache
Expand All @@ -17,7 +17,6 @@
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
package eu.tsystems.mms.tic.testframework.logging;

Expand All @@ -31,6 +30,7 @@ default Logger log() {
}

default Logger prompt() {
return PromptLogger.getLogger(this.getClass());
//return PromptLogger.getLogger(this.getClass());
return log();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public static MethodContext setCurrentTestResult(ITestResult iTestResult) {
*
* @param methodContext Method Context.
*/
private static void setCurrentMethodContext(final MethodContext methodContext) {
public static void setCurrentMethodContext(final MethodContext methodContext) {
CURRENT_METHOD_CONTEXT.set(methodContext);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Testerra
*
* (C) 2021, Mike Reiche, T-Systems MMS GmbH, Deutsche Telekom AG
*
* Deutsche Telekom AG and all other contributors /
* copyright owners license this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

package io.testerra.test.logging;

import eu.tsystems.mms.tic.testframework.logging.Loggable;
import eu.tsystems.mms.tic.testframework.report.model.context.ClassContext;
import eu.tsystems.mms.tic.testframework.report.model.context.MethodContext;
import eu.tsystems.mms.tic.testframework.testing.TesterraTest;
import org.testng.annotations.Test;

public class LoggingTest extends TesterraTest implements Loggable {

@Test
public void test_loggingWithMethodContext() {
log().info("Send me to method context", new MethodContext("new", MethodContext.Type.TEST_METHOD, null));
}
}

0 comments on commit 4ca6e90

Please sign in to comment.