blob: f38c31163bb560f1ddff8d92eb6ab2578a9c5ee8 [file] [log] [blame]
Janak Ramakrishnan058c4ab2016-02-08 21:30:36 +00001// Copyright 2016 The Bazel Authors. All rights reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14package com.google.devtools.build.skyframe;
15
Googler694105d2017-11-10 19:40:08 +010016import com.google.common.truth.FailureMetadata;
17import com.google.common.truth.Subject;
Janak Ramakrishnan058c4ab2016-02-08 21:30:36 +000018import com.google.common.truth.Truth;
19
Googler694105d2017-11-10 19:40:08 +010020/** {@link Subject.Factory} for {@link NodeEntry} objects, providing {@link NodeEntrySubject}s. */
21public class NodeEntrySubjectFactory implements Subject.Factory<NodeEntrySubject, NodeEntry> {
Janak Ramakrishnan058c4ab2016-02-08 21:30:36 +000022 public static NodeEntrySubject assertThatNodeEntry(NodeEntry nodeEntry) {
23 return Truth.assertAbout(new NodeEntrySubjectFactory()).that(nodeEntry);
24 }
25
26 @Override
Googler694105d2017-11-10 19:40:08 +010027 public NodeEntrySubject createSubject(FailureMetadata failureMetadata, NodeEntry nodeEntry) {
28 return new NodeEntrySubject(failureMetadata, nodeEntry);
Janak Ramakrishnan058c4ab2016-02-08 21:30:36 +000029 }
30}