Inheritance: System.Web.UI.Page
Exemple #1
0
        private OpenIdRelyingParty(ICryptoKeyStore cryptoKeyStore, INonceStore nonceStore, IHostFactories hostFactories)
        {
            // If we are a smart-mode RP (supporting associations), then we MUST also be
            // capable of storing nonces to prevent replay attacks.
            // If we're a dumb-mode RP, then 2.0 OPs are responsible for preventing replays.
            Requires.That(cryptoKeyStore == null || nonceStore != null, null, OpenIdStrings.AssociationStoreRequiresNonceStore);

            this.securitySettings = OpenIdElement.Configuration.RelyingParty.SecuritySettings.CreateSecuritySettings();

            this.behaviors.CollectionChanged += this.OnBehaviorsChanged;
            foreach (var behavior in OpenIdElement.Configuration.RelyingParty.Behaviors.CreateInstances(false, null))
            {
                this.behaviors.Add(behavior);
            }

            // Without a nonce store, we must rely on the Provider to protect against
            // replay attacks.  But only 2.0+ Providers can be expected to provide
            // replay protection.
            if (nonceStore == null &&
                this.SecuritySettings.ProtectDownlevelReplayAttacks &&
                this.SecuritySettings.MinimumRequiredOpenIdVersion < ProtocolVersion.V20)
            {
                Logger.OpenId.Warn("Raising minimum OpenID version requirement for Providers to 2.0 to protect this stateless RP from replay attacks.");
                this.SecuritySettings.MinimumRequiredOpenIdVersion = ProtocolVersion.V20;
            }

            this.channel = new OpenIdRelyingPartyChannel(cryptoKeyStore, nonceStore, this.SecuritySettings, hostFactories);
            var associationStore = cryptoKeyStore != null ? new CryptoKeyStoreAsRelyingPartyAssociationStore(cryptoKeyStore) : null;

            this.AssociationManager = new AssociationManager(this.Channel, associationStore, this.SecuritySettings);
            this.discoveryServices  = new IdentifierDiscoveryServices(this);

            Reporting.RecordFeatureAndDependencyUse(this, cryptoKeyStore, nonceStore);
        }
Exemple #2
0
        public static DateExact Parse(string DateString, Reporting Reporting)
        {
            var date = new DateExact(Reporting);

            date.DateString = DateString;
            return(date);
        }
        public void TestReportingWith0DeliquentMembers()
        {
            mockLibraryService.Setup(m => m.GetDelinquentMembers()).ReturnsAsync(new List<Member>() { });

            var reporting = new Reporting();
            Assert.AreEqual(0, reporting.GetNumberOfDeliquentMembers().Result);
        }
Exemple #4
0
        public LdsIndividualOrdianceEndowment(Reporting Reporting)
            : base(Reporting)
        {
            Tag = "ENDL";

            LdsEndowmentDateStatus = LdsEndowmentDateStatus.Unknown;
        }
        /// <summary>
        /// Performs any transformation on an incoming message that may be necessary and/or
        /// validates an incoming message based on the rules of this channel binding element.
        /// </summary>
        /// <param name="message">The incoming message to process.</param>
        /// <param name="cancellationToken">The cancellation token.</param>
        /// <returns>
        /// The protections (if any) that this binding element applied to the message.
        /// Null if this binding element did not even apply to this binding element.
        /// </returns>
        /// <exception cref="ProtocolException">
        /// Thrown when the binding element rules indicate that this message is invalid and should
        /// NOT be processed.
        /// </exception>
        /// <remarks>
        /// Implementations that provide message protection must honor the
        /// <see cref="MessagePartAttribute.RequiredProtection"/> properties where applicable.
        /// </remarks>
        public Task <MessageProtections?> ProcessIncomingMessageAsync(IProtocolMessage message, CancellationToken cancellationToken)
        {
            var extendableMessage = message as IProtocolMessageWithExtensions;

            if (extendableMessage != null)
            {
                // First add the extensions that are signed by the Provider.
                foreach (IOpenIdMessageExtension signedExtension in this.GetExtensions(extendableMessage, true, null))
                {
                    Reporting.RecordFeatureUse(signedExtension);
                    signedExtension.IsSignedByRemoteParty = true;
                    extendableMessage.Extensions.Add(signedExtension);
                }

                // Now search again, considering ALL extensions whether they are signed or not,
                // skipping the signed ones and adding the new ones as unsigned extensions.
                if (this.receiveUnsignedExtensions)
                {
                    Func <string, bool> isNotSigned = typeUri => !extendableMessage.Extensions.Cast <IOpenIdMessageExtension>().Any(ext => ext.TypeUri == typeUri);
                    foreach (IOpenIdMessageExtension unsignedExtension in this.GetExtensions(extendableMessage, false, isNotSigned))
                    {
                        Reporting.RecordFeatureUse(unsignedExtension);
                        unsignedExtension.IsSignedByRemoteParty = false;
                        extendableMessage.Extensions.Add(unsignedExtension);
                    }
                }

                return(NoneTask);
            }

            return(NullTask);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="NegativeAuthenticationResponse"/> class.
        /// </summary>
        /// <param name="response">The negative assertion response received by the Relying Party.</param>
        /// ERIC'S CODE
        //internal NegativeAuthenticationResponse(NegativeAssertionResponse response) {
        public NegativeAuthenticationResponse(NegativeAssertionResponse response)
        {
            Requires.NotNull(response, "response");
            this.response = response;

            Reporting.RecordEventOccurrence(this, string.Empty);
        }
 private void btnReportCustom_Click(object sender, RibbonControlEventArgs e)
 {
     if (this.ddlReportTo.SelectedItem != null)
     {
         Reporting.SendReports(this.ddlReportTo.SelectedItem.Tag.ToString());
     }
 }
Exemple #8
0
        //[Category ("")]
        public void TestAddAllergyDocument()
        {
            PatientVisit.OpenVisitInPhysicianConsole();

            AllergyDocumentExample = new AllergyDocument("Allergy", "AllergyDocument1.csv", MethodBase.GetCurrentMethod().Name);
            AllergyDocumentExample.OpenEditor();
            AllergyDocumentExample.FillInDocument();
            AllergyDocumentExample.ClickSubmitButton();

            AllergyDocumentExample.OpenViewer();
            AllergyDocumentExample.VerifyViewer();
            AllergyDocumentExample.CloseViewer();

            AllergyDocumentExample.OpenEditor();
            AllergyDocumentExample.VerifyDocument();
            AllergyDocumentExample.UpdateData("AllergyDocument2.csv");
            AllergyDocumentExample.ModifyDocument();
            AllergyDocumentExample.ClickSubmitButton();
            AllergyDocumentExample.OpenEditor();
            AllergyDocumentExample.VerifyModifiedDocument();

            AllergyDocumentExample.OpenViewer();
            AllergyDocumentExample.VerifyViewer();
            AllergyDocumentExample.CloseViewer();

            Reporting.AssertVerificationErrors();
        }
        public void ReportMyEvents()
        {
            //this.Api.Login("tst.sdk_tst", "tst.sdk_tst");
            var result = Reporting.ReportMyEvents(this.Api);

            Assert.IsTrue(result.Result.Any());
        }
Exemple #10
0
        public IHttpActionResult PostReporting(Reporting reporting)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.Reportings.Add(reporting);

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateException)
            {
                if (ReportingExists(reporting.ReportID))
                {
                    return(Conflict());
                }
                else
                {
                    throw;
                }
            }

            return(CreatedAtRoute("DefaultApi", new { id = reporting.ReportID }, reporting));
        }
        public ActionResult Report(int id)
        {
            Reporting reporting = db.Reportings.Find(id);

            ViewBag.WordDocumentFilename = "Generate_Report";
            return(View(reporting));
        }
Exemple #12
0
        private static DvnrReport GenerateReportFromCurrentMachine()
        {
            Console.Out.WriteLine("Gathering machine information");
            var machineInformation = Reporting.GetMachineInformation();

            Console.Out.WriteLine("Gathering site information");
            var sites = Reporting.GetSites();

            Console.Out.WriteLine("Gathering app pool information");
            var appPools = Reporting.GetAppPools();

            // set number of apps using each pool and remove ones that aren't used
            foreach (var appPool in appPools)
            {
                appPool.NumApplications = sites.SelectMany(s => s.Applications).Select(s => s.AppPoolName).Count(name => name == appPool.Name);
            }
            appPools.RemoveAll(pool => pool.NumApplications == 0);

            Console.Out.WriteLine("Gathering GAC library information");
            var gacLibraries = Reporting.GetGACLibraries();

            var report = new DvnrReport
            {
                Version            = typeof(DvnrReport).Assembly.GetName().Version.ToString(),
                MachineInformation = machineInformation,
                Sites        = sites,
                AppPools     = appPools,
                GacLibraries = gacLibraries
            };

            return(report);
        }
        //public async Task<ActionResult> Edit([Bind(Include = "ReportingID,LetterOfCommandID,NomorLaporan,MemoDescription,SummaryDescription,Bab01Title,Bab01SubTitle,Bab01Description,Bab02Title,Bab02SubTitle,Bab02Description,Fact,Criteria,Impact,impactValue,Cause,Recommendation,FieldWorkID")] Reporting reporting, string submit)
        public async Task <ActionResult> Edit(Reporting reporting, string submit)
        {
            if (ModelState.IsValid)
            {
                if (submit == "Generate Summary")
                {
                    return(RedirectToAction("Summary", new { id = reporting.ReportingID }));
                }
                else if (submit == "Generate Report")
                {
                    return(RedirectToAction("Report", new { id = reporting.ReportingID }));
                }
                string username = User.Identity.Name;
                db.Configuration.ProxyCreationEnabled = false;
                Reporting oldData = db.Reportings.AsNoTracking().Where(p => p.ReportingID.Equals(reporting.ReportingID)).FirstOrDefault();
                auditTransact.CreateAuditTrail("Update", reporting.ReportingID, "Reporting", oldData, reporting, username);
                reporting.ReportingBabModel.Clear();
                foreach (var item in reporting.ListBab)
                {
                    reporting.ReportingBabModel.Add(item);
                }

                db.Entry(reporting).State = EntityState.Modified;
                await db.SaveChangesAsync();

                TempData["message"] = "Report successfully updated!";
                return(RedirectToAction("Index"));
            }
            return(View(reporting));
        }
Exemple #14
0
        /// <summary>
        /// Initializes a new instance of the <see cref="HttpRequestInfo"/> class.
        /// </summary>
        /// <param name="request">The ASP.NET structure to copy from.</param>
        public HttpRequestInfo(HttpRequest request)
        {
            Contract.Requires <ArgumentNullException>(request != null);
            Contract.Ensures(this.HttpMethod == request.HttpMethod);
            Contract.Ensures(this.Url == request.Url);
            Contract.Ensures(this.RawUrl == request.RawUrl);
            Contract.Ensures(this.UrlBeforeRewriting != null);
            Contract.Ensures(this.Headers != null);
            Contract.Ensures(this.InputStream == request.InputStream);
            Contract.Ensures(this.form == request.Form);
            Contract.Ensures(this.queryString == request.QueryString);

            this.HttpMethod         = request.HttpMethod;
            this.Url                = request.Url;
            this.UrlBeforeRewriting = GetPublicFacingUrl(request);
            this.RawUrl             = request.RawUrl;
            this.Headers            = GetHeaderCollection(request.Headers);
            this.InputStream        = request.InputStream;

            // These values would normally be calculated, but we'll reuse them from
            // HttpRequest since they're already calculated, and there's a chance (<g>)
            // that ASP.NET does a better job of being comprehensive about gathering
            // these as well.
            this.form        = request.Form;
            this.queryString = request.QueryString;

            Reporting.RecordRequestStatistics(this);
        }
Exemple #15
0
 public DateExact(int Day, Month Month, YearGregorian Year, Reporting Reporting)
     : base(Reporting)
 {
     this.Day   = Day;
     this.Month = Month;
     this.Year  = Year;
 }
Exemple #16
0
        public ChangeDate(Reporting Reporting)
            : base(Reporting)
        {
            Notes = new List <NoteStructure>();

            Tag = "CHAN";
        }
            public Corporation_(Reporting Reporting)
                : base(Reporting)
            {
                PhoneNumbers = new List <string>();

                Tag = "CORP";
            }
        public LdsIndividualOrdianceChildSealing(Reporting Reporting)
            : base(Reporting)
        {
            Tag = "SLGC";

            LdsChildSealingDateStatus = LdsChildSealingDateStatus.Unknown;
        }
Exemple #19
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NegativeAuthenticationResponse"/> class.
        /// </summary>
        /// <param name="response">The negative assertion response received by the Relying Party.</param>
        internal NegativeAuthenticationResponse(NegativeAssertionResponse response)
        {
            Contract.Requires <ArgumentNullException>(response != null);
            this.response = response;

            Reporting.RecordEventOccurrence(this, string.Empty);
        }
Exemple #20
0
        public ActionResult ReportView(ReportingViewModel model)
        {
            Reporting reportingObj = dbContext.Reportings.Where(x => x.SlNo == model.SlNo).FirstOrDefault();

            model.ReportPath   = reportingObj.ReportPath;
            model.Qryname      = reportingObj.Qryname;
            model.xmlTableName = reportingObj.xmlTableName;
            model.ReportPath   = reportingObj.ReportPath;
            model.ReportName   = reportingObj.ReportName;
            model.Para1        = reportingObj.Para1;
            model.Para2        = reportingObj.Para2;
            model.Para3        = reportingObj.Para3;
            model.Para4        = reportingObj.Para4;
            if (!model.Para1.Equals("0"))
            {
                model.Parameters.Add(model.Para1, "");
            }
            if (!model.Para2.Equals("0"))
            {
                model.Parameters.Add(model.Para2, "");
            }
            if (!model.Para3.Equals("0"))
            {
                model.Parameters.Add(model.Para3, "");
            }
            if (!model.Para4.Equals("0"))
            {
                model.Parameters.Add(model.Para4, "");
            }
            model.SlNo = model.SlNo;
            return(View(model));
        }
        public void Return_Nth_Most_Recent_Paychecks_For_Nth_Lowest_Paid_Employees()
        {
            var result = Reporting.CalculateMostRecentPaychecks(10, 2);

            Assert.AreEqual(20, result.Count);
            Assert.AreEqual(new DateTime(2019, 3, 22), result[0].IssueDate);
        }
Exemple #22
0
        public void TearDownTest()
        {
            try
            {
                Browser.Driver.Navigate().GoToUrl(login.GetBaseURL() + "/Calendar/Calendar.aspx");
                PatientVisit.DeleteVisit(login.GetBaseURL());
            }

            catch (Exception)
            {
                Console.WriteLine("Visit could not be deleted.");
            }

            try
            {
                patient.DeletePatient(ref login);
            }

            catch (Exception)
            {
                Console.WriteLine("Patient could not be deleted.");
            }

            Browser.Driver.Quit();
            Reporting.Commit();
        }
Exemple #23
0
        public JsonResult ReportDataforChequeDetail(string CheckStatusID, string Appid, string blockID, string ProjectID, string From, string TO)
        {
            if (ProjectID == "")
            {
                ProjectID = "0";
            }

            if (CheckStatusID == "")
            {
                CheckStatusID = "0";
            }
            if (Appid == "")
            {
                Appid = "0";
            }
            if (blockID == "")
            {
                blockID = "0";
            }

            using (Reporting obj_s = new Reporting())
                try
                {
                    return(Json(obj_s.GetReportChequeDetail(CheckStatusID, ProjectID, blockID, Appid, From, TO), JsonRequestBehavior.AllowGet));
                }
                catch (Exception ex)
                {
                    return(Json("Exception", ex.Message, JsonRequestBehavior.AllowGet));
                }
            finally
            {
                obj_s.Dispose();
            }
        }
Exemple #24
0
        public SeriesCollection HourSignup()
        {
            SeriesCollection SC = new SeriesCollection();

            List <Signups> signups = Reporting.GetSignupsByHour();

            Series series = new Series();

            for (int i = 0; i < signups.Count; i++)
            {
                Element e = new Element();
                e.Name = signups[i].Date.Hour + ":00";

                e.ShowValue = true;
                e.YValue    = signups[i].NumberOfSignups;
                series.Elements.Add(e);
            }

            SC.Add(series);

            // Set Different Colors for our Series
            SC[0].DefaultElement.Color = Color.CornflowerBlue;
            //SC[1].DefaultElement.Color = Color.FromArgb(255,255,0);
            //SC[2].DefaultElement.Color = Color.FromArgb(255,99,49);
            //SC[3].DefaultElement.Color = Color.FromArgb(0,156,255);

            return(SC);
        }
Exemple #25
0
        public ActionResult DeleteConfirmed(int id)
        {
            Reporting reporting = repo.Get(id);

            repo.Delete(reporting);
            return(RedirectToAction("Index"));
        }
        public async Task <IHttpActionResult> PutReporting(int id, Reporting reporting)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != reporting.ReportingID)
            {
                return(BadRequest());
            }

            db.Entry(reporting).State = EntityState.Modified;

            try
            {
                await db.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!ReportingExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
Exemple #27
0
        public void close()
        {
            try
            {
                driver.Close();
            }
            catch (Exception)
            {
            }


            if (getMainProp(mainProp.downloadReports).ToLower() == "true")
            {
                try
                {
                    Reporting.initiateDownload(getMainProp(mainProp.securityToken), getMainProp(mainProp.reportDirectory), getMainProp(mainProp.host).Split('.')[0]);
                }
                catch (Exception)
                {
                }
            }


            try
            {
                driver.Quit();
            }
            catch (Exception)
            {
            }
        }
Exemple #28
0
 static UriIdentifier()
 {
     // Our first attempt to handle trailing periods in path segments is to leverage
     // full trust if it's available to rewrite the rules.
     // In fact this is the ONLY way in .NET 3.5 (and arguably in .NET 4.0) to send
     // outbound HTTP requests with trailing periods, so it's the only way to perform
     // discovery on such an identifier.
     try {
         UriParser.Register(roundTrippingHttpParser, "dnoarthttp", 80);
         UriParser.Register(roundTrippingHttpsParser, "dnoarthttps", 443);
         UriParser.Register(publishableHttpParser, "dnoahttp", 80);
         UriParser.Register(publishableHttpsParser, "dnoahttps", 443);
         roundTrippingHttpParser.Initialize(false);
         roundTrippingHttpsParser.Initialize(false);
         publishableHttpParser.Initialize(true);
         publishableHttpsParser.Initialize(true);
         schemeSubstitution = true;
         Logger.OpenId.Debug(".NET Uri class path compression overridden.");
         Reporting.RecordFeatureUse("FullTrust");
     } catch (SecurityException) {
         // We must be running in partial trust.  Nothing more we can do.
         Logger.OpenId.Warn("Unable to coerce .NET to stop compressing URI paths due to partial trust limitations.  Some URL identifiers may be unable to complete login.");
         Reporting.RecordFeatureUse("PartialTrust");
     } catch (FieldAccessException) {             // one customer reported getting this exception
         // We must be running in partial trust.  Nothing more we can do.
         Logger.OpenId.Warn("Unable to coerce .NET to stop compressing URI paths due to partial trust limitations.  Some URL identifiers may be unable to complete login.");
         Reporting.RecordFeatureUse("PartialTrust");
     }
 }
Exemple #29
0
        private List <SchemeDPO> GetSchemeDPO()
        {
            List <SchemeDPO> list = new List <SchemeDPO>();

            foreach (Set s in _project.Sets)
            {
                foreach (var r in s.Scheme.Images)
                {
                    list.Add(new SchemeDPO
                    {
                        Image       = Reporting.ImageToByteArray(r.Image),
                        ImageName   = r.Name,
                        Note        = s.Scheme.Note,
                        SchemeId    = s.Scheme.Id,
                        SetId       = s.Id,
                        PaddingLeft = Reporting.GetPaddingLeft(r.Image, 642, 355),
                        PaddingTop  = Reporting.GetPaddingTop(r.Image, 642, 355),
                        SetMachine  = s.Machine,
                        SetName     = s.SetName,
                        ImageNote   = r.FullPath
                    });
                }
            }
            return(list);
        }
        /**
         * Grabs a single button press
         */
        override public bool GetButtonEvent(uint idx)
        {
            /* Not sure if we need this, but it remaps the Xbox Controller to a 'D' Input controller */
            //idx = LogToXboxBtnIdx(idx);

            if (idx < 0)        /* caller can change button defs to -1 to remove certain features */
            {
                return(false);
            }
            if (idx == 0)
            {
                Reporting.Log(ErrorCode.InvalidParamValue, Button0Error, 0, "");
                return(false);
            }
            if (idx > 0)
            {
                --idx;
            }
            uint old    = (_oldBtns >> (int)idx) & 1;
            uint latest = (_gv.btns >> (int)idx) & 1;

            if ((0 == old) && (1 == latest))
            {
                return(true);
            }
            return(false);
        }
Exemple #31
0
 public static void BeforeTestRun()
 {
     if (AppConfigManager.Reporting())
     {
         extent = Reporting.InitializeReport();
     }
 }
        public void creation_of_reports()
        {
            var logging = new Reporting();

            logging.ReporterFor<DivReport>()
                .ShouldBeTheSameAs(logging.ReporterFor<DivReport>());

            logging.ReporterFor<ListReport>()
                .ShouldBeTheSameAs(logging.ReporterFor<ListReport>());
        }
        public static Zap Create()
        {
            var settings = new Settings();
            var logger = new CommandLineLogger();
            var httpClientHelper = new HttpClientHelper(settings);
            var scanner = new Scanner(settings, logger, httpClientHelper);
            var reporting = new Reporting(settings,logger,httpClientHelper);
            var spider = new Spider(settings, logger, httpClientHelper);

            return new Zap( settings, logger, scanner, reporting, spider);
        }
        public override void Process(AnalysisLayer layer, ref Reporting.Analysis analysis)
        {
            // Create the report and the analysis layer to report on.
            var report = new AnalysisReport();
            report.Name = "Simplification Report";

            // Perform various analysis operations.
            this.ProcessFrequentExpressions(layer, report);

            // Add our layers and report to the analysis result.
            if (report.Issues.Count > 0)
                layer.Reports.Add(report);
        }
        public void TestReportingGetAmmountOwed1Delinquent()
        {
            var _oneDelinquentMember = new List<Member>()
            {
                new Member() { FirstName = "Larry", LastName = "Fitzgerald", Id = "1" }
            };
            mockLibraryService.Setup(m => m.GetDelinquentMembers()).ReturnsAsync(_oneDelinquentMember);
            mockLibraryService.Setup(m => m.GetAmountOwed(_oneDelinquentMember[0])).Returns(1.00f);

            var reporting = new Reporting();
            var _delinquencyReports = reporting.GetDeliquentMemberReports().Result;
            Assert.AreEqual(1.00f, _delinquencyReports[0].AmountOwed);
        }
        internal HttpRequestMessage PostReportRequest(string url, Reporting reason)
        {
            if (string.IsNullOrEmpty(url))
                throw new ArgumentNullException(nameof(url));

            var parameters = new Dictionary<string, string>()
            {
                { "reason", ((int)reason).ToString() }
            };

            var request = new HttpRequestMessage(HttpMethod.Post, url)
            {
                Content = new FormUrlEncodedContent(parameters.ToArray())
            };

            return request;
        }
        public void TestReportingGetAmmountOwed5Delinquent()
        {
            mockLibraryService.Setup(m => m.GetDelinquentMembers()).ReturnsAsync(_expectedDelinquentMembers);
            mockLibraryService.Setup(m => m.GetAmountOwed(_expectedDelinquentMembers[0])).Returns(1.00f);
            mockLibraryService.Setup(m => m.GetAmountOwed(_expectedDelinquentMembers[1])).Returns(2.00f);
            mockLibraryService.Setup(m => m.GetAmountOwed(_expectedDelinquentMembers[2])).Returns(3.00f);
            mockLibraryService.Setup(m => m.GetAmountOwed(_expectedDelinquentMembers[3])).Returns(4.00f);
            mockLibraryService.Setup(m => m.GetAmountOwed(_expectedDelinquentMembers[4])).Returns(5.00f);

            var reporting = new Reporting();
            var _delinquencyReports = reporting.GetDeliquentMemberReports().Result;
            Assert.AreEqual(1.00f, _delinquencyReports[0].AmountOwed);
            Assert.AreEqual(2.00f, _delinquencyReports[1].AmountOwed);
            Assert.AreEqual(3.00f, _delinquencyReports[2].AmountOwed);
            Assert.AreEqual(4.00f, _delinquencyReports[3].AmountOwed);
            Assert.AreEqual(5.00f, _delinquencyReports[4].AmountOwed);
        }
        public void debug_tracing()
        {
            var logging = new Reporting();
            logging.StartDebugListening();

            Debug.WriteLine("Whoa!");
            Debug.WriteLine("You don't say");
            Debug.WriteLine("Bazinga!");

            logging.Dispose();

            Debug.WriteLine("NOT HERE");

            var html = logging.ReporterFor<DebugReport>().ToHtml().ToString();

            html.ShouldContain("Whoa!");
            html.ShouldContain("You don&#39;t say");
            html.ShouldContain("Bazinga!");

            // The following text was written after the DebugReporter was disposed and should not be present
            html.ShouldNotContain("NOT HERE");

        }
        public void generate_reports()
        {
            var logging = new Reporting();
            logging.ReporterFor<DivReport>().Add("1").Add("2");
            logging.ReporterFor<ListReport>().Add("3").Add("4");

            var reports = logging.GenerateReports().OrderBy(x => x.title)
                .ToArray();

            reports.Select(x => x.title)
                .ShouldHaveTheSameElementsAs("Divs", "Lists");

            reports[0].html.ShouldContain("<div>1</div>");
            reports[0].html.ShouldContain("<div>2</div>");

            reports[1].html.ShouldContain("<li>3</li>");
            reports[1].html.ShouldContain("<li>4</li>");

            reports[0].count.ShouldBe(2);


            
        }
 public AssignToRouteModel(Reporting.Cargo cargo, IList<RouteCandidateDTO> routeCandidates)
 {
    _routeCandidates = routeCandidates;
    _cargo = cargo;
 }
Exemple #41
0
 public abstract void Process(AnalysisLayer layer, ref Reporting.Analysis analysis);
 /// <summary>
 /// Writes the specified paragraph.
 /// </summary>
 /// <param name="p">The paragraph.</param>
 void IReportWriter.WriteParagraph(Reporting.Paragraph p)
 {
     this.CurrentSection.AddParagraph(p.Text ?? string.Empty);
 }
        public void TestReportingWithKnownExpectedDeliquentMembers()
        {
            mockLibraryService.Setup(m => m.GetDelinquentMembers()).ReturnsAsync(_expectedDelinquentMembers);

            var reporting = new Reporting();
            Assert.AreEqual(_expectedDelinquentMembers.Count, reporting.GetNumberOfDeliquentMembers().Result);
        }