public void ShouldAllowSpecifyingConstructorArgumentsNotTakenIntoAccountDuringValueBehaviorCheck() { XAssert.IsValue <ProperValueTypeWithOneArgumentIdentity>( ValueTypeTraits.Custom.SkipConstructorArgument(0)); Assert.Throws <AssertionException>(XAssert.IsValue <ProperValueTypeWithOneArgumentIdentity>); }
public void ShouldAcceptProperFullValueTypesAndRejectBadOnes() { XAssert.IsValue <ProperValueType>(); Assert.Throws <AssertionException>(XAssert.IsValue <ProperValueTypeWithoutEqualityOperator>); }
public void ShouldBeAbleToChooseInternalConstructorWhenThereisNoPublicOne() { Assert.DoesNotThrow(() => Any.Instance <FileNameWithoutExtension>()); Assert.DoesNotThrow(() => XAssert.IsValue <FileNameWithoutExtension>()); }
public void ShouldPassValueTypeAssertionForProperValueTypeWithInternalConstructor() { XAssert.IsValue <FileExtension>(); }
public void ShouldPreferInternalNonRecursiveConstructorsToPublicRecursiveOnes() { Assert.DoesNotThrow(() => Any.Instance <DirectoryPath>()); Assert.DoesNotThrow(() => XAssert.IsValue <DirectoryPath>()); }
public void ShouldPassValueTypeAssertionForProperValueType() { XAssert.IsValue <ProperValueType>(); }
public void ShouldWorkForPrimitves() { XAssert.IsValue <int>(); }
public void ShouldWorkForStructuresWithDefaultEquality() { XAssert.IsValue <Maybe <string> >(); }
public void ShouldBehaveLikeValue() { XAssert.IsValue <ChangedPath>(); }
public static AndConstraint <TypeAssertions> BehaveLikeValue(this TypeAssertions o) { XAssert.IsValue(o.Subject); return(new AndConstraint <TypeAssertions>(o)); }