public void SAccountInfo_Should_ReturnDataRow() { // Arrange var webAppId = Guid.Empty; ShimEPMData.ConstructorGuidGuid = (_, site, webApp) => { webAppId = webApp; }; ShimEPMData.AllInstances.SAccountInfo = _ => new ShimDataRow(); // Act var result = reportBiz.SAccountInfo(DummyGuid); // Assert result.ShouldSatisfyAllConditions( () => result.ShouldNotBeNull(), () => webAppId.ShouldBe(DummyGuid)); }
private void ConfigureServerForm() { Guid webAppId = Guid.Empty; if (Request.QueryString["id"] != null) { webAppId = new Guid(Request.QueryString["id"]); var rb = new ReportBiz(SPContext.Current.Site.ID, webAppId); Dictionary <string, string> databases = rb.GetDistinctDatabaseList(); DataRow SAInfo = rb.SAccountInfo(webAppId); if (SAInfo != null && (bool)SAInfo["SAccount"]) { username.Text = SAInfo["Username"].ToString(); password.Text = SAInfo["Password"].ToString(); sacccount.Checked = true; } } btnExisting.Checked = true; //Default setting }