public void AddNewSociety() { SocietyRepositoryTestClass societyRepositoryTestClass = new SocietyRepositoryTestClass(); Society newSociety = new Society() { Id = Guid.NewGuid(), City = "Pune", Description = "TestSocietyDesc", Address="Test Address", Disabled = false, Locality = "Aundh", Name = "TestSociety", State = "Maharashtra", ZipCode = "411020" }; Society addedSociety = societyRepositoryTestClass.AddNewSociety(newSociety); Assert.IsTrue(addedSociety != null); }
public Society AddNewSociety(Society newSociety) { Society society = _SocietyRepository.Add(newSociety); return society; }
public Society UpdateSociety(Society society) { Society updatedSociety = _SocietyRepository.Update(society); return updatedSociety; }
public void AddNewSocietyWithBuildingAndHouse() { SocietyRepositoryTestClass societyRepositoryTestClass = new SocietyRepositoryTestClass(); Society newSociety = new Society() { Id = Guid.NewGuid(), City = "Pune", Description = "TestSocietyDesc4", Address = "Test Address3", Disabled = false, Locality = "Aundh", Name = "TestSociety4", State = "Maharashtra", ZipCode = "411020" }; newSociety.Buildings.Add(new Building() { Id = Guid.NewGuid(), Description = "A4", Name = "Test Building4" }); Society addedSociety = societyRepositoryTestClass.AddNewSociety(newSociety); Assert.IsTrue(addedSociety != null); }