import { describe, it, expect } from 'vitest';
import { computeNeighborhoodFactor } from '../neighborhood';

describe('Efeitos de Vizinhança — sec. 6.4', () => {
  it('Parede confrontante: a/S = 1 → fᵥ = 1,3', () => {
    expect(computeNeighborhoodFactor({ ratioAS: 1, location: 'wall' })).toBe(1.3);
  });
  it('Parede confrontante: a/S ≥ 3 → fᵥ = 1,0', () => {
    expect(computeNeighborhoodFactor({ ratioAS: 3, location: 'wall' })).toBe(1.0);
    expect(computeNeighborhoodFactor({ ratioAS: 5, location: 'wall' })).toBe(1.0);
  });
  it('Cobertura: a/S ≤ 0,5 → fᵥ = 1,3', () => {
    expect(computeNeighborhoodFactor({ ratioAS: 0.5, location: 'roof' })).toBe(1.3);
    expect(computeNeighborhoodFactor({ ratioAS: 0.3, location: 'roof' })).toBe(1.3);
  });
  it('Cobertura: a/S ≥ 1 → fᵥ = 1,0', () => {
    expect(computeNeighborhoodFactor({ ratioAS: 1, location: 'roof' })).toBe(1.0);
  });
});