Proofread Java inspections descriptions
[idea/community.git] / platform / smRunner / src / com / intellij / execution / testframework / sm / runner / events / TestStartedEvent.java
1 /*
2  * Copyright 2000-2012 JetBrains s.r.o.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package com.intellij.execution.testframework.sm.runner.events;
17
18 import jetbrains.buildServer.messages.serviceMessages.TestStarted;
19 import org.jetbrains.annotations.NotNull;
20 import org.jetbrains.annotations.Nullable;
21
22 public class TestStartedEvent extends BaseStartedNodeEvent {
23
24   private boolean myConfig;
25
26   public TestStartedEvent(@NotNull TestStarted testStarted,
27                           @Nullable String locationUrl) {
28     this(testStarted, locationUrl, BaseStartedNodeEvent.getMetainfo(testStarted));
29   }
30
31   public TestStartedEvent(@NotNull TestStarted testStarted,
32                           @Nullable String locationUrl,
33                           @Nullable String metainfo) {
34     super(testStarted.getTestName(),
35           TreeNodeEvent.getNodeId(testStarted),
36           getParentNodeId(testStarted),
37           locationUrl,
38           metainfo,
39           BaseStartedNodeEvent.getNodeType(testStarted),
40           BaseStartedNodeEvent.getNodeArgs(testStarted),
41           BaseStartedNodeEvent.isRunning(testStarted));
42   }
43
44   public TestStartedEvent(@Nullable String name,
45                           @Nullable String id,
46                           @Nullable String parentId,
47                           @Nullable String locationUrl,
48                           @Nullable String metainfo,
49                           @Nullable String nodeType,
50                           @Nullable String nodeArgs,
51                           boolean running) {
52     super(name,
53           id,
54           parentId,
55           locationUrl,
56           metainfo,
57           nodeType,
58           nodeArgs,
59           running);
60   }
61
62   public TestStartedEvent(@NotNull String name,
63                           @Nullable String locationUrl) {
64     this(name, locationUrl, null);
65   }
66
67   public TestStartedEvent(@NotNull String name,
68                           @Nullable String locationUrl,
69                           @Nullable String metainfo) {
70     super(name, null, null, locationUrl, metainfo,null, null, true);
71   }
72
73   public void setConfig(boolean config) {
74     myConfig = config;
75   }
76
77   public boolean isConfig() {
78     return myConfig;
79   }
80 }