public void TestTwoRCalc() { //what date to run DateTime toRun = new DateTime(2015, 1, 29); //RetentionReport report = new RetentionReport(); Bucketing testBucket = new Bucketing(); //assert that actual is same as expected //Debug.Assert(ContinuingUsersLastWeekExpected == CURRData.CountPreviousWeek, string.Format("Install - A:{0} => E:{1}", CURRData.CountPreviousWeek, ContinuingUsersLastWeekExpected)); //Debug.Assert(UsersThisWeekWhoWereContinuingLastWeek == CURRData.ReturningContinuing, string.Format("Played - A:{0} => E:{1}", CURRData.ReturningContinuing, UsersThisWeekWhoWereContinuingLastWeek)); //Debug.Assert(expectedCurr == CURRData.Percentage, string.Format("CURR - A:{0} => E:{1}", CURRData.Percentage, expectedCurr)); }
public void TestOneRCalc() { //what date to run; Bucketing testBucket = new Bucketing(); TestRetentionCalcs tester = new TestRetentionCalcs(); int ReactCount = 0; DataTable ValidationTable = DBManager.Instance.Query(Datastore.Monitoring, String.Format(@"SELECT * FROM {0};", VALIDATION_TABLE)); DataTable computedValues = DBManager.Instance.Query(Datastore.Monitoring, String.Format(@"SELECT * FROM {0} order by Date asc;", CALC_VALIDATION)); foreach (DataRow row in computedValues.AsEnumerable()) { DateTime process = DateTime.Parse(row["Date"].ToString()); ReturnerBuckets buckets = new TestRetentionVals(process).Get(); ReturnerRetentionDataPoints curr = buckets.CURR; //Console.ReadKey(); } //assert that actual is same as expected //Debug.Assert(ContinuingUsersLastWeekExpected == CURRData.CountPreviousWeek, string.Format("Install - A:{0} => E:{1}", CURRData.CountPreviousWeek, ContinuingUsersLastWeekExpected)); //Debug.Assert(UsersThisWeekWhoWereContinuingLastWeek == CURRData.ReturningContinuing, string.Format("Played - A:{0} => E:{1}", CURRData.ReturningContinuing, UsersThisWeekWhoWereContinuingLastWeek)); //Debug.Assert(expectedCurr == CURRData.Percentage, string.Format("CURR - A:{0} => E:{1}", CURRData.Percentage, expectedCurr)); }