Exemplo n.º 1
0
    public void OnlyProcessesSameTypeOnce(ValidateType sut)
    {
        sut.AllowableEnumerable.IsAllowed(typeof(Class)).Returns(true);

        sut.Validate(typeof(Class));
        sut.Validate(typeof(Class));

        sut.AllowableEnumerable.Received(1).IsAllowed(typeof(Class));
    }
Exemplo n.º 2
0
    public void CheckIfFuncAllowed(ValidateType sut)
    {
        sut.AllowableFunc.IsAllowed(typeof(Class)).Returns(true);

        sut.Validate(typeof(Class));

        sut.Registrations.Items.DidNotReceiveWithAnyArgs().ContainsKey(default !);