Exemplo n.º 1
0
 public void Initialize()
 {
     _mockRepository          = new MockRepository(MockBehavior.Strict);
     _mockIncomeTaxRepository = _mockRepository.Create <IIncomeTaxRepository>();
     _mockIncomeTaxRepository.Setup(x => x.CreateIncomeTax(It.IsAny <IncomeTax>())).Returns(new IncomeTax());
     _taxCalculatorService = new TaxCalculatorService(_mockIncomeTaxRepository.Object);
     _controller           = new IncomeTaxController(_taxCalculatorService);
 }
    public bool pay    = false;  // Si es falso: eligio pagar el 10% de lo contrario paga 200

    public IncomeTaxController()
    {
        if (singleton == null)
        {
            singleton = this;
        }
        else if (singleton != this)
        {
            Destroy(this);
        }
    }