Exemplo n.º 1
0
 public void InlineAutoNSubstituteData_Should_Call_For_Each_Value(
     SampleEnum value,
     [Frozen] ISampleInterface interfaceType,
     SampleClass concreteType,
     SampleDependantClass dependantType)
 {
     value.Should().BeOneOf(SampleEnum.One, SampleEnum.Two, SampleEnum.Three);
     interfaceType.Should().NotBeNull();
     interfaceType.IsSubstitute().Should().BeTrue();
     concreteType.Should().NotBeNull();
     concreteType.IsSubstitute().Should().BeFalse();
     dependantType.Should().NotBeNull();
     dependantType.Dependency.Should().Be(interfaceType);
 }
Exemplo n.º 2
0
    public void Should_Create_Abstract_Type_With_NSubstitute(
        ISampleInterface abstractType,
        string str,
        int i)
    {
        abstractType
        .Should().NotBeNull();
        abstractType.IsSubstitute()
        .Should().BeTrue();

        abstractType.StringProperty
        .Returns(str);
        abstractType.StringProperty
        .Should().Be(str);

        abstractType.IntProperty
        .Returns(i);
        abstractType.IntProperty
        .Should().Be(i);
    }