Exemplo n.º 1
0
        public void ReportTypeLanguage_Controller_Put_Test()
        {
            foreach (LanguageEnum LanguageRequest in AllowableLanguages)
            {
                foreach (int ContactID in new List <int>()
                {
                    AdminContactID
                })                                                             //, TestEmailValidatedContactID, TestEmailNotValidatedContactID })
                {
                    ReportTypeLanguageController reportTypeLanguageController = new ReportTypeLanguageController(DatabaseTypeEnum.SqlServerTestDB);
                    Assert.IsNotNull(reportTypeLanguageController);
                    Assert.AreEqual(DatabaseTypeEnum.SqlServerTestDB, reportTypeLanguageController.DatabaseType);

                    ReportTypeLanguage reportTypeLanguageLast = new ReportTypeLanguage();
                    using (CSSPDBContext db = new CSSPDBContext(DatabaseType))
                    {
                        Query query = new Query();
                        query.Language = LanguageRequest;

                        ReportTypeLanguageService reportTypeLanguageService = new ReportTypeLanguageService(query, db, ContactID);
                        reportTypeLanguageLast = (from c in db.ReportTypeLanguages select c).FirstOrDefault();
                    }

                    // ok with ReportTypeLanguage info
                    IHttpActionResult jsonRet = reportTypeLanguageController.GetReportTypeLanguageWithID(reportTypeLanguageLast.ReportTypeLanguageID);
                    Assert.IsNotNull(jsonRet);

                    OkNegotiatedContentResult <ReportTypeLanguage> Ret = jsonRet as OkNegotiatedContentResult <ReportTypeLanguage>;
                    ReportTypeLanguage reportTypeLanguageRet           = Ret.Content;
                    Assert.AreEqual(reportTypeLanguageLast.ReportTypeLanguageID, reportTypeLanguageRet.ReportTypeLanguageID);

                    BadRequestErrorMessageResult badRequest = jsonRet as BadRequestErrorMessageResult;
                    Assert.IsNull(badRequest);

                    // Put to return success
                    IHttpActionResult jsonRet2 = reportTypeLanguageController.Put(reportTypeLanguageRet, LanguageRequest.ToString());
                    Assert.IsNotNull(jsonRet2);

                    OkNegotiatedContentResult <ReportTypeLanguage> reportTypeLanguageRet2 = jsonRet2 as OkNegotiatedContentResult <ReportTypeLanguage>;
                    Assert.IsNotNull(reportTypeLanguageRet2);

                    BadRequestErrorMessageResult badRequest2 = jsonRet2 as BadRequestErrorMessageResult;
                    Assert.IsNull(badRequest2);

                    // Put to return CSSPError because ReportTypeLanguageID of 0 does not exist
                    reportTypeLanguageRet.ReportTypeLanguageID = 0;
                    IHttpActionResult jsonRet3 = reportTypeLanguageController.Put(reportTypeLanguageRet, LanguageRequest.ToString());
                    Assert.IsNotNull(jsonRet3);

                    OkNegotiatedContentResult <ReportTypeLanguage> reportTypeLanguageRet3 = jsonRet3 as OkNegotiatedContentResult <ReportTypeLanguage>;
                    Assert.IsNull(reportTypeLanguageRet3);

                    BadRequestErrorMessageResult badRequest3 = jsonRet3 as BadRequestErrorMessageResult;
                    Assert.IsNotNull(badRequest3);
                }
            }
        }
        public IHttpActionResult GetReportTypeLanguageWithID([FromUri] int ReportTypeLanguageID, [FromUri] string lang = "en", [FromUri] string extra = "")
        {
            using (CSSPDBContext db = new CSSPDBContext(DatabaseType))
            {
                ReportTypeLanguageService reportTypeLanguageService = new ReportTypeLanguageService(new Query()
                {
                    Language = (lang == "fr" ? LanguageEnum.fr : LanguageEnum.en)
                }, db, ContactID);

                reportTypeLanguageService.Query = reportTypeLanguageService.FillQuery(typeof(ReportTypeLanguage), lang, 0, 1, "", "", extra);

                if (reportTypeLanguageService.Query.Extra == "A")
                {
                    ReportTypeLanguageExtraA reportTypeLanguageExtraA = new ReportTypeLanguageExtraA();
                    reportTypeLanguageExtraA = reportTypeLanguageService.GetReportTypeLanguageExtraAWithReportTypeLanguageID(ReportTypeLanguageID);

                    if (reportTypeLanguageExtraA == null)
                    {
                        return(NotFound());
                    }

                    return(Ok(reportTypeLanguageExtraA));
                }
                else if (reportTypeLanguageService.Query.Extra == "B")
                {
                    ReportTypeLanguageExtraB reportTypeLanguageExtraB = new ReportTypeLanguageExtraB();
                    reportTypeLanguageExtraB = reportTypeLanguageService.GetReportTypeLanguageExtraBWithReportTypeLanguageID(ReportTypeLanguageID);

                    if (reportTypeLanguageExtraB == null)
                    {
                        return(NotFound());
                    }

                    return(Ok(reportTypeLanguageExtraB));
                }
                else
                {
                    ReportTypeLanguage reportTypeLanguage = new ReportTypeLanguage();
                    reportTypeLanguage = reportTypeLanguageService.GetReportTypeLanguageWithReportTypeLanguageID(ReportTypeLanguageID);

                    if (reportTypeLanguage == null)
                    {
                        return(NotFound());
                    }

                    return(Ok(reportTypeLanguage));
                }
            }
        }
        private bool TryToSave(ReportTypeLanguage reportTypeLanguage)
        {
            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateException ex)
            {
                reportTypeLanguage.ValidationResults = new List <ValidationResult>()
                {
                    new ValidationResult(ex.Message + (ex.InnerException != null ? " Inner: " + ex.InnerException.Message : ""))
                }.AsEnumerable();
                return(false);
            }

            return(true);
        }
        public bool Update(ReportTypeLanguage reportTypeLanguage)
        {
            reportTypeLanguage.ValidationResults = Validate(new ValidationContext(reportTypeLanguage), ActionDBTypeEnum.Update);
            if (reportTypeLanguage.ValidationResults.Count() > 0)
            {
                return(false);
            }

            db.ReportTypeLanguages.Update(reportTypeLanguage);

            if (!TryToSave(reportTypeLanguage))
            {
                return(false);
            }

            return(true);
        }
Exemplo n.º 5
0
        public void ReportTypeLanguage_Controller_GetReportTypeLanguageWithID_Test()
        {
            foreach (LanguageEnum LanguageRequest in AllowableLanguages)
            {
                foreach (int ContactID in new List <int>()
                {
                    AdminContactID
                })                                                             //, TestEmailValidatedContactID, TestEmailNotValidatedContactID })
                {
                    ReportTypeLanguageController reportTypeLanguageController = new ReportTypeLanguageController(DatabaseTypeEnum.SqlServerTestDB);
                    Assert.IsNotNull(reportTypeLanguageController);
                    Assert.AreEqual(DatabaseTypeEnum.SqlServerTestDB, reportTypeLanguageController.DatabaseType);

                    ReportTypeLanguage reportTypeLanguageFirst = new ReportTypeLanguage();
                    using (CSSPDBContext db = new CSSPDBContext(DatabaseType))
                    {
                        ReportTypeLanguageService reportTypeLanguageService = new ReportTypeLanguageService(new Query(), db, ContactID);
                        reportTypeLanguageFirst = (from c in db.ReportTypeLanguages select c).FirstOrDefault();
                    }

                    // ok with ReportTypeLanguage info
                    IHttpActionResult jsonRet = reportTypeLanguageController.GetReportTypeLanguageWithID(reportTypeLanguageFirst.ReportTypeLanguageID);
                    Assert.IsNotNull(jsonRet);

                    OkNegotiatedContentResult <ReportTypeLanguage> Ret = jsonRet as OkNegotiatedContentResult <ReportTypeLanguage>;
                    ReportTypeLanguage reportTypeLanguageRet           = Ret.Content;
                    Assert.AreEqual(reportTypeLanguageFirst.ReportTypeLanguageID, reportTypeLanguageRet.ReportTypeLanguageID);

                    BadRequestErrorMessageResult badRequest = jsonRet as BadRequestErrorMessageResult;
                    Assert.IsNull(badRequest);

                    // Not Found
                    IHttpActionResult jsonRet2 = reportTypeLanguageController.GetReportTypeLanguageWithID(0);
                    Assert.IsNotNull(jsonRet2);

                    OkNegotiatedContentResult <ReportTypeLanguage> reportTypeLanguageRet2 = jsonRet2 as OkNegotiatedContentResult <ReportTypeLanguage>;
                    Assert.IsNull(reportTypeLanguageRet2);

                    NotFoundResult notFoundRequest = jsonRet2 as NotFoundResult;
                    Assert.IsNotNull(notFoundRequest);
                }
            }
        }
        public IHttpActionResult Delete([FromBody] ReportTypeLanguage reportTypeLanguage, [FromUri] string lang = "en")
        {
            using (CSSPDBContext db = new CSSPDBContext(DatabaseType))
            {
                ReportTypeLanguageService reportTypeLanguageService = new ReportTypeLanguageService(new Query()
                {
                    Language = (lang == "fr" ? LanguageEnum.fr : LanguageEnum.en)
                }, db, ContactID);

                if (!reportTypeLanguageService.Delete(reportTypeLanguage))
                {
                    return(BadRequest(String.Join("|||", reportTypeLanguage.ValidationResults)));
                }
                else
                {
                    reportTypeLanguage.ValidationResults = null;
                    return(Ok(reportTypeLanguage));
                }
            }
        }
Exemplo n.º 7
0
        public void ReportTypeLanguage_Controller_GetReportTypeLanguageList_Test()
        {
            foreach (LanguageEnum LanguageRequest in AllowableLanguages)
            {
                foreach (int ContactID in new List <int>()
                {
                    AdminContactID
                })                                                             //, TestEmailValidatedContactID, TestEmailNotValidatedContactID })
                {
                    ReportTypeLanguageController reportTypeLanguageController = new ReportTypeLanguageController(DatabaseTypeEnum.SqlServerTestDB);
                    Assert.IsNotNull(reportTypeLanguageController);
                    Assert.AreEqual(DatabaseTypeEnum.SqlServerTestDB, reportTypeLanguageController.DatabaseType);

                    ReportTypeLanguage reportTypeLanguageFirst = new ReportTypeLanguage();
                    int   count = -1;
                    Query query = new Query();
                    using (CSSPDBContext db = new CSSPDBContext(DatabaseTypeEnum.SqlServerTestDB))
                    {
                        ReportTypeLanguageService reportTypeLanguageService = new ReportTypeLanguageService(query, db, ContactID);
                        reportTypeLanguageFirst = (from c in db.ReportTypeLanguages select c).FirstOrDefault();
                        count = (from c in db.ReportTypeLanguages select c).Count();
                        count = (query.Take > count ? count : query.Take);
                    }

                    // ok with ReportTypeLanguage info
                    IHttpActionResult jsonRet = reportTypeLanguageController.GetReportTypeLanguageList();
                    Assert.IsNotNull(jsonRet);

                    OkNegotiatedContentResult <List <ReportTypeLanguage> > ret = jsonRet as OkNegotiatedContentResult <List <ReportTypeLanguage> >;
                    Assert.AreEqual(reportTypeLanguageFirst.ReportTypeLanguageID, ret.Content[0].ReportTypeLanguageID);
                    Assert.AreEqual((count > query.Take ? query.Take : count), ret.Content.Count);

                    List <ReportTypeLanguage> reportTypeLanguageList = new List <ReportTypeLanguage>();
                    count = -1;
                    query = new Query();
                    using (CSSPDBContext db = new CSSPDBContext(DatabaseTypeEnum.SqlServerTestDB))
                    {
                        ReportTypeLanguageService reportTypeLanguageService = new ReportTypeLanguageService(query, db, ContactID);
                        reportTypeLanguageList = (from c in db.ReportTypeLanguages select c).OrderBy(c => c.ReportTypeLanguageID).Skip(0).Take(2).ToList();
                        count = (from c in db.ReportTypeLanguages select c).Count();
                    }

                    if (count > 0)
                    {
                        query.Skip = 0;
                        query.Take = 5;
                        count      = (query.Take > count ? query.Take : count);

                        // ok with ReportTypeLanguage info
                        jsonRet = reportTypeLanguageController.GetReportTypeLanguageList(query.Language.ToString(), query.Skip, query.Take);
                        Assert.IsNotNull(jsonRet);

                        ret = jsonRet as OkNegotiatedContentResult <List <ReportTypeLanguage> >;
                        Assert.AreEqual(reportTypeLanguageList[0].ReportTypeLanguageID, ret.Content[0].ReportTypeLanguageID);
                        Assert.AreEqual((count > query.Take ? query.Take : count), ret.Content.Count);

                        if (count > 1)
                        {
                            query.Skip = 1;
                            query.Take = 5;
                            count      = (query.Take > count ? query.Take : count);

                            // ok with ReportTypeLanguage info
                            IHttpActionResult jsonRet2 = reportTypeLanguageController.GetReportTypeLanguageList(query.Language.ToString(), query.Skip, query.Take);
                            Assert.IsNotNull(jsonRet2);

                            OkNegotiatedContentResult <List <ReportTypeLanguage> > ret2 = jsonRet2 as OkNegotiatedContentResult <List <ReportTypeLanguage> >;
                            Assert.AreEqual(reportTypeLanguageList[1].ReportTypeLanguageID, ret2.Content[0].ReportTypeLanguageID);
                            Assert.AreEqual((count > query.Take ? query.Take : count), ret2.Content.Count);
                        }
                    }
                }
            }
        }
Exemplo n.º 8
0
        public void ReportTypeLanguage_Controller_Post_Test()
        {
            foreach (LanguageEnum LanguageRequest in AllowableLanguages)
            {
                foreach (int ContactID in new List <int>()
                {
                    AdminContactID
                })                                                             //, TestEmailValidatedContactID, TestEmailNotValidatedContactID })
                {
                    ReportTypeLanguageController reportTypeLanguageController = new ReportTypeLanguageController(DatabaseTypeEnum.SqlServerTestDB);
                    Assert.IsNotNull(reportTypeLanguageController);
                    Assert.AreEqual(DatabaseTypeEnum.SqlServerTestDB, reportTypeLanguageController.DatabaseType);

                    ReportTypeLanguage reportTypeLanguageLast = new ReportTypeLanguage();
                    using (CSSPDBContext db = new CSSPDBContext(DatabaseType))
                    {
                        Query query = new Query();
                        query.Language = LanguageRequest;
                        query.Asc      = "";
                        query.Desc     = "";

                        ReportTypeLanguageService reportTypeLanguageService = new ReportTypeLanguageService(query, db, ContactID);
                        reportTypeLanguageLast = (from c in db.ReportTypeLanguages select c).FirstOrDefault();
                    }

                    // ok with ReportTypeLanguage info
                    IHttpActionResult jsonRet = reportTypeLanguageController.GetReportTypeLanguageWithID(reportTypeLanguageLast.ReportTypeLanguageID);
                    Assert.IsNotNull(jsonRet);

                    OkNegotiatedContentResult <ReportTypeLanguage> Ret = jsonRet as OkNegotiatedContentResult <ReportTypeLanguage>;
                    ReportTypeLanguage reportTypeLanguageRet           = Ret.Content;
                    Assert.AreEqual(reportTypeLanguageLast.ReportTypeLanguageID, reportTypeLanguageRet.ReportTypeLanguageID);

                    BadRequestErrorMessageResult badRequest = jsonRet as BadRequestErrorMessageResult;
                    Assert.IsNull(badRequest);

                    // Post to return CSSPError because ReportTypeLanguageID exist
                    IHttpActionResult jsonRet2 = reportTypeLanguageController.Post(reportTypeLanguageRet, LanguageRequest.ToString());
                    Assert.IsNotNull(jsonRet2);

                    OkNegotiatedContentResult <ReportTypeLanguage> reportTypeLanguageRet2 = jsonRet2 as OkNegotiatedContentResult <ReportTypeLanguage>;
                    Assert.IsNull(reportTypeLanguageRet2);

                    BadRequestErrorMessageResult badRequest2 = jsonRet2 as BadRequestErrorMessageResult;
                    Assert.IsNotNull(badRequest2);

                    // Post to return newly added ReportTypeLanguage
                    reportTypeLanguageRet.ReportTypeLanguageID      = 0;
                    reportTypeLanguageController.Request            = new System.Net.Http.HttpRequestMessage();
                    reportTypeLanguageController.Request.RequestUri = new System.Uri("http://localhost:5000/api/reportTypeLanguage");
                    IHttpActionResult jsonRet3 = reportTypeLanguageController.Post(reportTypeLanguageRet, LanguageRequest.ToString());
                    Assert.IsNotNull(jsonRet3);

                    CreatedNegotiatedContentResult <ReportTypeLanguage> reportTypeLanguageRet3 = jsonRet3 as CreatedNegotiatedContentResult <ReportTypeLanguage>;
                    Assert.IsNotNull(reportTypeLanguageRet3);

                    BadRequestErrorMessageResult badRequest3 = jsonRet3 as BadRequestErrorMessageResult;
                    Assert.IsNull(badRequest3);

                    IHttpActionResult jsonRet4 = reportTypeLanguageController.Delete(reportTypeLanguageRet, LanguageRequest.ToString());
                    Assert.IsNotNull(jsonRet4);

                    OkNegotiatedContentResult <ReportTypeLanguage> reportTypeLanguageRet4 = jsonRet4 as OkNegotiatedContentResult <ReportTypeLanguage>;
                    Assert.IsNotNull(reportTypeLanguageRet4);

                    BadRequestErrorMessageResult badRequest4 = jsonRet4 as BadRequestErrorMessageResult;
                    Assert.IsNull(badRequest4);
                }
            }
        }
        private IEnumerable <ValidationResult> Validate(ValidationContext validationContext, ActionDBTypeEnum actionDBType)
        {
            string             retStr             = "";
            Enums              enums              = new Enums(LanguageRequest);
            ReportTypeLanguage reportTypeLanguage = validationContext.ObjectInstance as ReportTypeLanguage;

            reportTypeLanguage.HasErrors = false;

            if (actionDBType == ActionDBTypeEnum.Update || actionDBType == ActionDBTypeEnum.Delete)
            {
                if (reportTypeLanguage.ReportTypeLanguageID == 0)
                {
                    reportTypeLanguage.HasErrors = true;
                    yield return(new ValidationResult(string.Format(CSSPServicesRes._IsRequired, "ReportTypeLanguageID"), new[] { "ReportTypeLanguageID" }));
                }

                if (!(from c in db.ReportTypeLanguages select c).Where(c => c.ReportTypeLanguageID == reportTypeLanguage.ReportTypeLanguageID).Any())
                {
                    reportTypeLanguage.HasErrors = true;
                    yield return(new ValidationResult(string.Format(CSSPServicesRes.CouldNotFind_With_Equal_, "ReportTypeLanguage", "ReportTypeLanguageID", reportTypeLanguage.ReportTypeLanguageID.ToString()), new[] { "ReportTypeLanguageID" }));
                }
            }

            ReportType ReportTypeReportTypeID = (from c in db.ReportTypes where c.ReportTypeID == reportTypeLanguage.ReportTypeID select c).FirstOrDefault();

            if (ReportTypeReportTypeID == null)
            {
                reportTypeLanguage.HasErrors = true;
                yield return(new ValidationResult(string.Format(CSSPServicesRes.CouldNotFind_With_Equal_, "ReportType", "ReportTypeID", reportTypeLanguage.ReportTypeID.ToString()), new[] { "ReportTypeID" }));
            }

            retStr = enums.EnumTypeOK(typeof(LanguageEnum), (int?)reportTypeLanguage.Language);
            if (!string.IsNullOrWhiteSpace(retStr))
            {
                reportTypeLanguage.HasErrors = true;
                yield return(new ValidationResult(string.Format(CSSPServicesRes._IsRequired, "Language"), new[] { "Language" }));
            }

            if (string.IsNullOrWhiteSpace(reportTypeLanguage.Name))
            {
                reportTypeLanguage.HasErrors = true;
                yield return(new ValidationResult(string.Format(CSSPServicesRes._IsRequired, "Name"), new[] { "Name" }));
            }

            if (!string.IsNullOrWhiteSpace(reportTypeLanguage.Name) && reportTypeLanguage.Name.Length > 100)
            {
                reportTypeLanguage.HasErrors = true;
                yield return(new ValidationResult(string.Format(CSSPServicesRes._MaxLengthIs_, "Name", "100"), new[] { "Name" }));
            }

            retStr = enums.EnumTypeOK(typeof(TranslationStatusEnum), (int?)reportTypeLanguage.TranslationStatusName);
            if (!string.IsNullOrWhiteSpace(retStr))
            {
                reportTypeLanguage.HasErrors = true;
                yield return(new ValidationResult(string.Format(CSSPServicesRes._IsRequired, "TranslationStatusName"), new[] { "TranslationStatusName" }));
            }

            if (string.IsNullOrWhiteSpace(reportTypeLanguage.Description))
            {
                reportTypeLanguage.HasErrors = true;
                yield return(new ValidationResult(string.Format(CSSPServicesRes._IsRequired, "Description"), new[] { "Description" }));
            }

            if (!string.IsNullOrWhiteSpace(reportTypeLanguage.Description) && reportTypeLanguage.Description.Length > 1000)
            {
                reportTypeLanguage.HasErrors = true;
                yield return(new ValidationResult(string.Format(CSSPServicesRes._MaxLengthIs_, "Description", "1000"), new[] { "Description" }));
            }

            retStr = enums.EnumTypeOK(typeof(TranslationStatusEnum), (int?)reportTypeLanguage.TranslationStatusDescription);
            if (!string.IsNullOrWhiteSpace(retStr))
            {
                reportTypeLanguage.HasErrors = true;
                yield return(new ValidationResult(string.Format(CSSPServicesRes._IsRequired, "TranslationStatusDescription"), new[] { "TranslationStatusDescription" }));
            }

            if (string.IsNullOrWhiteSpace(reportTypeLanguage.StartOfFileName))
            {
                reportTypeLanguage.HasErrors = true;
                yield return(new ValidationResult(string.Format(CSSPServicesRes._IsRequired, "StartOfFileName"), new[] { "StartOfFileName" }));
            }

            if (!string.IsNullOrWhiteSpace(reportTypeLanguage.StartOfFileName) && reportTypeLanguage.StartOfFileName.Length > 100)
            {
                reportTypeLanguage.HasErrors = true;
                yield return(new ValidationResult(string.Format(CSSPServicesRes._MaxLengthIs_, "StartOfFileName", "100"), new[] { "StartOfFileName" }));
            }

            retStr = enums.EnumTypeOK(typeof(TranslationStatusEnum), (int?)reportTypeLanguage.TranslationStatusStartOfFileName);
            if (!string.IsNullOrWhiteSpace(retStr))
            {
                reportTypeLanguage.HasErrors = true;
                yield return(new ValidationResult(string.Format(CSSPServicesRes._IsRequired, "TranslationStatusStartOfFileName"), new[] { "TranslationStatusStartOfFileName" }));
            }

            if (reportTypeLanguage.LastUpdateDate_UTC.Year == 1)
            {
                reportTypeLanguage.HasErrors = true;
                yield return(new ValidationResult(string.Format(CSSPServicesRes._IsRequired, "LastUpdateDate_UTC"), new[] { "LastUpdateDate_UTC" }));
            }
            else
            {
                if (reportTypeLanguage.LastUpdateDate_UTC.Year < 1980)
                {
                    reportTypeLanguage.HasErrors = true;
                    yield return(new ValidationResult(string.Format(CSSPServicesRes._YearShouldBeBiggerThan_, "LastUpdateDate_UTC", "1980"), new[] { "LastUpdateDate_UTC" }));
                }
            }

            TVItem TVItemLastUpdateContactTVItemID = (from c in db.TVItems where c.TVItemID == reportTypeLanguage.LastUpdateContactTVItemID select c).FirstOrDefault();

            if (TVItemLastUpdateContactTVItemID == null)
            {
                reportTypeLanguage.HasErrors = true;
                yield return(new ValidationResult(string.Format(CSSPServicesRes.CouldNotFind_With_Equal_, "TVItem", "LastUpdateContactTVItemID", reportTypeLanguage.LastUpdateContactTVItemID.ToString()), new[] { "LastUpdateContactTVItemID" }));
            }
            else
            {
                List <TVTypeEnum> AllowableTVTypes = new List <TVTypeEnum>()
                {
                    TVTypeEnum.Contact,
                };
                if (!AllowableTVTypes.Contains(TVItemLastUpdateContactTVItemID.TVType))
                {
                    reportTypeLanguage.HasErrors = true;
                    yield return(new ValidationResult(string.Format(CSSPServicesRes._IsNotOfType_, "LastUpdateContactTVItemID", "Contact"), new[] { "LastUpdateContactTVItemID" }));
                }
            }

            retStr = "";      // added to stop compiling CSSPError
            if (retStr != "") // will never be true
            {
                reportTypeLanguage.HasErrors = true;
                yield return(new ValidationResult("AAA", new[] { "AAA" }));
            }
        }
Exemplo n.º 10
0
 public ReportTypeLanguageTest()
 {
     reportTypeLanguage       = new ReportTypeLanguage();
     reportTypeLanguageExtraA = new ReportTypeLanguageExtraA();
     reportTypeLanguageExtraB = new ReportTypeLanguageExtraB();
 }