public Boolean Create(Type type) { _dataContext.Add(type); int saved = _dataContext.SaveChanges(); return(saved == 1 ? true : false); }
public void Should_Get_Type_By_Id_Return_Type_Object() { Type typeAux = _typeRepository.GetAll().FirstOrDefault(); Type type = _typeRepository.GetById(typeAux.TypeId); Assert.IsInstanceOfType(type, typeof(Type)); }
public TypeQueriesMock() { _types = new List <Type>(); Type type1 = new Type("definition 11", "done_outline"); Type type2 = new Type("definition 22", "done_outline"); Type type3 = new Type("definition 33", "done_outline"); Type type4 = new Type("definition 44", "done_outline"); Type type5 = new Type("definition 55", "done_outline"); _types.Add(type1); _types.Add(type2); _types.Add(type3); _types.Add(type4); _types.Add(type5); }
public Boolean Create(Type type) { return(true); }
public TypeViewModel GetById(Guid typeId) { Type type = _typeRepository.GetById(typeId); return(new TypeViewModel(type.TypeId, type.Definicion, type.Icon)); }
public void Should_Be_Created() { Type type = new Type("definition test", "done_outline"); Assert.IsInstanceOfType(type, typeof(Type)); }