public class FontFixture extends Object
Font
s.Constructor and Description |
---|
FontFixture(Font target)
Creates a new
FontFixture . |
FontFixture(Font target,
org.assertj.core.description.Description description)
Creates a new
FontFixture . |
FontFixture(Font target,
String description)
Creates a new
FontFixture . |
Modifier and Type | Method and Description |
---|---|
String |
description() |
FontFixture |
requireBold()
Verifies that this fixture's font is bold.
|
FontFixture |
requireFamily(String family)
Verifies that the family name of this fixture's font is equal to the given one.
|
FontFixture |
requireItalic()
Verifies that this fixture's font is italic.
|
FontFixture |
requireName(String name)
Verifies that the logical name of this fixture's font is equal to the given one.
|
FontFixture |
requireNotBold()
Verifies that this fixture's font is not bold.
|
FontFixture |
requireNotItalic()
Verifies that this fixture's font is not italic.
|
FontFixture |
requireNotPlain()
Verifies that this fixture's font is not plain.
|
FontFixture |
requirePlain()
Verifies that this fixture's font is plain.
|
FontFixture |
requireSize(int size)
Verifies that the point size of this fixture's font is equal to the given one.
|
Font |
target() |
public FontFixture(@Nonnull Font target)
FontFixture
.target
- the font to manage.NullPointerException
- if target
is null
.public FontFixture(@Nonnull Font target, @Nonnull String description)
FontFixture
.target
- the font to manage.description
- this fixture's description.NullPointerException
- if target
is null
.public FontFixture(@Nonnull Font target, @Nullable org.assertj.core.description.Description description)
FontFixture
.target
- the font to manage.description
- this fixture's description.NullPointerException
- if target
is null
.@Nonnull public FontFixture requireFamily(@Nonnull String family)
family
- the expected family name.AssertionError
- if the family name of this fixture's font is not equal to the given one.Font.getFamily()
@Nonnull public FontFixture requireName(@Nonnull String name)
name
- the expected logical name.AssertionError
- if the logical name of this fixture's font is not equal to the given one.Font.getName()
@Nonnull public FontFixture requireSize(int size)
size
- the expected point size.AssertionError
- if the point size of this fixture's font is not equal to the given one.Font.getSize()
@Nonnull public FontFixture requireBold()
AssertionError
- if this fixture's font is not bold.Font.isBold()
@Nonnull public FontFixture requireNotBold()
AssertionError
- if this fixture's font is bold.Font.isBold()
@Nonnull public FontFixture requireItalic()
AssertionError
- if this fixture's font is not italic.Font.isItalic()
@Nonnull public FontFixture requireNotItalic()
AssertionError
- if this fixture's font is italic.Font.isItalic()
@Nonnull public FontFixture requirePlain()
AssertionError
- if this fixture's font is not plain.Font.isPlain()
@Nonnull public FontFixture requireNotPlain()
AssertionError
- if this fixture's font is plain.Font.isPlain()
Copyright © 2014–2017 AssertJ. All rights reserved.