public void InitializePicturesCorrectly() { var rim = new RimWithTire(); var pictures = rim.Pictures; Assert.That(pictures, Is.Not.Null.And.InstanceOf <HashSet <RimWithTirePicture> >()); }
public void TypeOfDouble() { var rim = new RimWithTire(); var result = rim.GrappleMm.GetType(); Assert.True(result == typeof(double)); }
public void TypeOfDouble() { var rim = new RimWithTire(); var result = rim.CentralHoleSize.GetType(); Assert.True(result == typeof(double)); }
public void TypeOfDoubel() { var rim = new RimWithTire(); var result = rim.Height.GetType(); Assert.True(result == typeof(double)); }
public void TypeOfInt() { var rim = new RimWithTire(); var result = rim.SpeedIndex.GetType(); Assert.True(result == typeof(int)); }
public void TypeOfDouble() { var rim = new RimWithTire(); var result = rim.SpaceBetweenBolts.GetType(); Assert.True(result == typeof(double)); }
public void TypeOfInt() { var rim = new RimWithTire(); var result = rim.NumberOfBolts.GetType(); Assert.True(result == typeof(int)); }
public void TypeOfString(string test) { var bm = new RimWithTire(); bm.WeightIndex = test; var result = bm.WeightIndex.GetType(); Assert.True(result == typeof(string)); }
public void HaveStringLengthAttributeAttribute() { var bm = new RimWithTire(); var result = bm .GetType() .GetProperty("WeightIndex") .GetCustomAttributes(false) .Where(x => x.GetType() == typeof(System.ComponentModel.DataAnnotations.StringLengthAttribute)) .Any(); Assert.True(result); }
public void HaveRequiredAttribute() { var rim = new RimWithTire(); var result = rim .GetType() .GetProperty("CentralHoleSize") .GetCustomAttributes(false) .Where(x => x.GetType() == typeof(System.ComponentModel.DataAnnotations.RequiredAttribute)) .Any(); Assert.True(result); }
public void HaveRangeAttribute() { var rim = new RimWithTire(); var result = rim .GetType() .GetProperty("SpaceBetweenBolts") .GetCustomAttributes(false) .Where(x => x.GetType() == typeof(System.ComponentModel.DataAnnotations.RangeAttribute)) .Any(); Assert.True(result); }
public void AddNewTireAd(string userId, RimWithTire rimWithTire, IEnumerable <string> picturesPaths) { var user = this.usersService.GetById(userId); rimWithTire.Owner = user; this.rimWithTireRepo.Add(rimWithTire); foreach (var url in picturesPaths) { var picture = new RimWithTirePicture { Url = url, RimWithTire = rimWithTire }; rimWithTire.Pictures.Add(picture); } this.uow.Commit(); }
public void CreateInstanceOfBaseModel() { var rim = new RimWithTire(); Assert.That(rim, Is.InstanceOf <BaseModel>()); }
public void CreateInstanceOfITire() { var rim = new RimWithTire(); Assert.That(rim, Is.InstanceOf <ITire>()); }