public void IsEqualToWorksWithStruct() { var inLove = new Mood { Description = "In love", IsPositive = true }; Check.ThatEnum(inLove).IsEqualTo(inLove); }
public void NotIsNullWorksWithNullable() { Mood? goodMood = new Mood(); Check.That(goodMood).Not.IsNull(); }
public void NotIsNotNullThrowsWithNonNullNullable() { Mood? goodMood = new Mood(); Check.That(goodMood).Not.IsNotNull(); }
public void NotIsNotNullThrowsWithNonNullNullable() { Mood? goodMood = new Mood(); Check.ThatCode(() => { Check.That(goodMood).Not.IsNotNull(); }) .Throws<FluentCheckException>() .WithMessage(Environment.NewLine+ "The checked nullable value must be null." + Environment.NewLine + "The checked value:" + Environment.NewLine + "\t[NFluent.Tests.Extensions.Mood]"); }