public static Apartment getApartment()
        {
            Mock<IPartitionSpace> partitionSpaceMock = new Mock<IPartitionSpace>();
            partitionSpaceMock.Setup(x => x.SurfaceArea).Returns(50);

            Apartment apartment = new Apartment(partitionSpaceMock.Object) {
                ResponsibleTenant = new PhysicalPerson("12345678901", "Mile", "Milic")
            };

            return apartment;
        }
        public void SetUp()
        {
            cadastre = new Cadastre("Trešnjevka", "332134", new City(10000, "Zagreb"));
            cadastralParticle = new CadastralParticle(cadastre, "123", 20, "opis");
            landRegistry = new LandRegistry(cadastralParticle);

            var buildingManager = new BuildingManager(new LegalPerson("12345678903", "Upravitelj"));

            building = new Building(landRegistry, buildingManager);

            partitionSpace1 = landRegistry.CreatePartitionSpace(23, "Stan 1", new PhysicalPerson("12345678903", "Mile1", "Milic"), 20);
            var apartment1 = new Apartment(partitionSpace1);
            building.AddApartment(apartment1);

            partitionSpace2 = landRegistry.CreatePartitionSpace(23, "Stan 2", new PhysicalPerson("12345678904", "Mile2", "Milic"), 20);
            var apartment2 = new Apartment(partitionSpace2);
            building.AddApartment(apartment2);

            partitionSpace3 = landRegistry.CreatePartitionSpace(23, "Stan 3", new PhysicalPerson("12345678905", "Mile3", "Milic"), 11);
            var apartment3 = new Apartment(partitionSpace1);
            building.AddApartment(apartment3);

            partitionSpace4 = landRegistry.CreatePartitionSpace(23, "Stan 4", new PhysicalPerson("12345678906", "Mile4", "Milic"), 49);
            var apartment4 = new Apartment(partitionSpace1);
            building.AddApartment(apartment4);
        }
        /// <summary>
        /// Izadaje racun za pricuvu
        /// </summary>
        /// <param name="apartment">stan za kojieg se izdaje racun za placanje pricuve</param>
        /// <returns>racun za pricuvu</returns>
        public Bill IssueReserveBillFor(Apartment apartment)
        {
            if(apartment.ResponsibleTenant == null) {
                throw new RulesException("Responsible tenant is not set.");
            }

            Bill bill = new Bill(apartment.ResponsibleTenant, buildingManager.LegalPerson, tax);
            decimal price = reserveCoefficient * apartment.SurfaceArea;
            BillItem billItem = new BillItem(1, price, "Pričuva");
            bill.AddBillItem(billItem);
            bill.ReferenceNumber = REFERENCE_NUMBER_PREFIX + apartment.Id + bill.DateTimeIssued.ToShortDateString();

            return bill;
        }
 /// <summary>
 /// Metoda koja dodaje stanove
 /// </summary>
 /// <param name="apartment">stan</param>
 public void AddApartment(Apartment apartment)
 {
     rooms.Add(apartment);
 }
 public void SetUp()
 {
     buildingManager = getBuildingManager();
     apartment = getApartment();
 }