Code cleanup.
Some checks failed
Build .NET Project / build (push) Has been cancelled

This commit is contained in:
2026-03-24 13:36:11 -04:00
parent 3bf89b97e8
commit 70f9af5934
3 changed files with 23 additions and 0 deletions

View File

@@ -524,6 +524,7 @@ namespace MarketData.DataAccess
try
{
if (null == analystRatings || 0 == analystRatings.Count) return true;
analystRatings = new AnalystRatings(analystRatings.DistinctBy(x => new {x.Symbol, x.Date.Date, x.BrokerageFirm}).ToList());
sqlConnection = SqlUtils.CreateMySqlConnection(MainDataSource.Instance.LocateDataSource("market_data"));
sqlTransaction = sqlConnection.BeginTransaction(System.Data.IsolationLevel.ReadCommitted);
DeleteAnalystRatings(analystRatings, sqlConnection, sqlTransaction);

View File

@@ -29,21 +29,25 @@ namespace MarketData.MarketDataModel
public CompanyProfile()
{
}
public String Industry
{
get { return industry; }
set { industry = value; }
}
public String Sector
{
get { return sector; }
set { sector = value; }
}
public String SecurityType
{
get { return securityType;; }
set { securityType = value; }
}
public bool IsEquity
{
get
@@ -51,30 +55,36 @@ namespace MarketData.MarketDataModel
return null!=SecurityType && SecurityType.Equals("EQUITY");
}
}
public String CompanyName
{
get{return companyName;}
set{companyName=value;}
}
public String Description
{
get{return description;}
set{description=value;}
}
public String Symbol
{
get { return symbol; }
set { symbol = value; }
}
public String PricingSource
{
set{pricingSource=value;}
}
public bool CanRollPrevious
{
get{return canRollPrevious;}
set{canRollPrevious=value;}
}
public bool FreezePricing
{
get{return freezePricing;}

View File

@@ -447,6 +447,18 @@ public class MarketDataUnitTestClass
Assert.IsTrue(null != companyProfile);
}
[TestMethod]
public void GetCompanyProfileMorningStar()
{
String symbol = "AAPL";
String nasdaq = "xnas";
String nyse = "xnys";
CompanyProfile companyProfile = MarketDataHelper.GetCompanyProfileMorningStar(symbol, nasdaq);
if(null==companyProfile)companyProfile = MarketDataHelper.GetCompanyProfileMorningStar(symbol, nyse);
Assert.IsTrue(null != companyProfile);
}
// Test all feeds
[TestMethod]
public void HeadlinesRetrieval()