Exemplo n.º 1
0
        public void Building_Name_Cannot_Be_Null_Or_Empty()
        {
            BuildingDto building = new BuildingDto {
                BuildingId = 0, Name = string.Empty, NumberOfUnits = 10
            };

            Assert.CatchAsync(() => buildingManager.AddBuildingAsync(building));
        }
        public async Task <int> CreateBuildingAsync(string name, int numberofUnits, string address)
        {
            var buildingDto = new BuildingDTO {
                Name = name, NumberOfUnits = numberofUnits, Address = address
            };
            await _buildingManager.AddBuildingAsync(buildingDto);

            return(buildingDto.Id);
        }