public void TypeOfInt() { var bm = new TirePicture(); var result = bm.TireId.GetType(); Assert.True(result == typeof(int)); }
public void BeVirtualProperty() { var context = new TirePicture(); var bindingFlags = BindingFlags.Public | BindingFlags.Instance; var commentsProperty = context.GetType().GetProperty("Tire", bindingFlags); Assert.That(commentsProperty.GetGetMethod().IsVirtual, Is.True); }
public void AddNewTireAd(string userId, Tire tire, IEnumerable <string> picturesPaths) { var user = this.usersService.GetById(userId); tire.Owner = user; this.tiresRepo.Add(tire); foreach (var url in picturesPaths) { var picture = new TirePicture { Url = url, Tire = tire }; tire.Pictures.Add(picture); } this.uow.Commit(); }