public void BenchmarkParsePerformance() { IList <string> keys = new List <string>(securityIds.Keys); Start(); for (int i = 0; i < ITERATION; i++) { string key = keys[i % keys.Count]; SecurityIdDetails detail = parser.Parse(key); Assert.IsNotNull(detail, "the Parse() is wrong."); Assert.AreEqual(detail.Type, securityIds[key], "the Parse() is wrong."); } Stop("Run DefaultSecurityIdParser.Parse() "); }
public void TestParse_Null_securityId() { instance.Parse(null); }
public void DefaultSecurityIdParser_CUSIP_Letters1() { SecurityIdDetails details = test.Parse("J0176K103"); // get the property to test the method. Assert.AreEqual("J0176K103", details.Id, "The Id property should be set to 'J0176K103'."); Assert.AreEqual(SecurityIdType.CUSIP, details.Type, "The Type property should be set to 'CUSIP'."); }