Janak Ramakrishnan | 058c4ab | 2016-02-08 21:30:36 +0000 | [diff] [blame] | 1 | // 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. |
| 14 | package com.google.devtools.build.skyframe; |
| 15 | |
Googler | 694105d | 2017-11-10 19:40:08 +0100 | [diff] [blame] | 16 | import com.google.common.truth.FailureMetadata; |
| 17 | import com.google.common.truth.Subject; |
Janak Ramakrishnan | 058c4ab | 2016-02-08 21:30:36 +0000 | [diff] [blame] | 18 | import com.google.common.truth.Truth; |
| 19 | |
Googler | 694105d | 2017-11-10 19:40:08 +0100 | [diff] [blame] | 20 | /** {@link Subject.Factory} for {@link NodeEntry} objects, providing {@link NodeEntrySubject}s. */ |
| 21 | public class NodeEntrySubjectFactory implements Subject.Factory<NodeEntrySubject, NodeEntry> { |
Janak Ramakrishnan | 058c4ab | 2016-02-08 21:30:36 +0000 | [diff] [blame] | 22 | public static NodeEntrySubject assertThatNodeEntry(NodeEntry nodeEntry) { |
| 23 | return Truth.assertAbout(new NodeEntrySubjectFactory()).that(nodeEntry); |
| 24 | } |
| 25 | |
| 26 | @Override |
Googler | 694105d | 2017-11-10 19:40:08 +0100 | [diff] [blame] | 27 | public NodeEntrySubject createSubject(FailureMetadata failureMetadata, NodeEntry nodeEntry) { |
| 28 | return new NodeEntrySubject(failureMetadata, nodeEntry); |
Janak Ramakrishnan | 058c4ab | 2016-02-08 21:30:36 +0000 | [diff] [blame] | 29 | } |
| 30 | } |