public void FindMethodOk() { clsGame AGame = new clsGame(); Boolean Found = false; Int32 GameId = 2; Found = AGame.Find(GameId); Assert.IsTrue(Found); }
public void FindMethodOK() { clsGame aGame = new clsGame(); bool found = false; int testId = 4; found = aGame.Find(testId); Assert.IsTrue(found); }
public void TestInStockFound() { clsGame AGame = new clsGame(); Boolean Found = false; Boolean OK = true; Int32 GameId = 3; Found = AGame.Find(GameId); if (AGame.InStock != true) { OK = false; } Assert.IsTrue(OK); }
public void TestStockQuantityFound() { clsGame AGame = new clsGame(); Boolean Found = false; Boolean OK = true; Int32 GameId = 3; Found = AGame.Find(GameId); if (AGame.StockQuantity != 1000) { OK = false; } Assert.IsTrue(OK); }
public void TestGameDescriptionFound() { clsGame AGame = new clsGame(); Boolean Found = false; Boolean OK = true; Int32 GameId = 3; Found = AGame.Find(GameId); if (AGame.GameDescription != "Miles Morales discovers explosive powers that set him apart from his mentor, Peter Parker. Master his unique, bio-electric venom blast attacks and covert camouflage power alongside spectacular web-slinging acrobatics, gadgets and skills.") { OK = false; } Assert.IsTrue(OK); }
public void TestGameTitleFound() { clsGame AGame = new clsGame(); Boolean Found = false; Boolean OK = true; Int32 GameId = 3; Found = AGame.Find(GameId); if (AGame.GameTitle != "MARVEL'S SPIDER-MAN: MILES MORALES") { OK = false; } Assert.IsTrue(OK); }
public void TestReleaseDateFound() { clsGame AGame = new clsGame(); Boolean Found = false; Boolean OK = true; Int32 GameId = 3; Found = AGame.Find(GameId); if (AGame.ReleaseDate != Convert.ToDateTime("12/11/2020")) { OK = false; } Assert.IsTrue(OK); }
public void TestGameTitleFound() { clsGame aGame = new clsGame(); bool found = false; bool ok = true; int testId = 4; found = aGame.Find(testId); if (aGame.GameTitle != "Adventures of Bork") { ok = false; } Assert.IsTrue(ok); }
public void TestGameIdFound() { clsGame aGame = new clsGame(); bool found = false; bool ok = true; int testId = 4; found = aGame.Find(testId); if (aGame.GameId != 4) { ok = false; } Assert.IsTrue(ok); }
public void TestActiveFound() { clsGame aGame = new clsGame(); bool found = false; bool ok = true; int testId = 4; found = aGame.Find(testId); if (aGame.Active != true) { ok = false; } Assert.IsTrue(ok); }
public void TestDatePublishedFound() { clsGame aGame = new clsGame(); bool found = false; bool ok = true; int testId = 4; found = aGame.Find(testId); if (aGame.DatePublished != (new DateTime(2021, 02, 21))) { ok = false; } Assert.IsTrue(ok); }
public void TestDiscountFound() { clsGame aGame = new clsGame(); bool found = false; bool ok = true; int testId = 4; found = aGame.Find(testId); if (aGame.Discount != 10) { ok = false; } Assert.IsTrue(ok); }
public void TestPriceFound() { clsGame aGame = new clsGame(); bool found = false; bool ok = true; int testId = 4; found = aGame.Find(testId); if (aGame.Price != 16.99) { ok = false; } Assert.IsTrue(ok); }
public void TestPriceFound() { clsGame AGame = new clsGame(); Boolean Found = false; Boolean OK = true; Int32 GameId = 3; Found = AGame.Find(GameId); if (AGame.Price != Convert.ToDecimal(51.99)) { OK = false; } Assert.IsTrue(OK); }
public void TestGameIdFound() { clsGame aGame = new clsGame(); Boolean found = false; Boolean ok = true; int testId = 17; found = aGame.Find(testId); if (aGame.GameId != 17) { ok = false; } Assert.IsTrue(ok); }
protected void btnFind_Click(object sender, EventArgs e) { clsGame aGame = new clsGame(); Int32 GameID; Boolean Found = false; GameID = Convert.ToInt32(txtGameId.Text); Found = aGame.Find(GameID); if (Found == true) { lblError.Text = ""; txtGameTitle.Text = aGame.GameTitle; txtPrice.Text = aGame.Price.ToString(); txtDiscount.Text = aGame.Discount.ToString(); calDatePublished.VisibleDate = aGame.DatePublished; calDatePublished.SelectedDate = aGame.DatePublished; chkActive.Checked = aGame.Active; } else { lblError.Text = "A record with that ID was not found"; } }
protected void btnFind_Click(object sender, EventArgs e) { //create an instance of the game class clsGame AGame = new clsGame(); //variable to store the primary key Int32 GameId; //variable to store the result of the find operation Boolean Found = false; //get the primary key entered by the user GameId = Convert.ToInt32(txtGameId.Text); //find the record Found = AGame.Find(GameId); if (Found == true) { //display the values of the properties in the form txtGameId.Text = AGame.GameId.ToString(); txtGameTitle.Text = AGame.GameTitle; txtGameDescription.Text = AGame.GameDescription; txtReleaseDate.Text = AGame.ReleaseDate.ToString(); txtPrice.Text = AGame.Price.ToString(); txtStockQuantity.Text = AGame.StockQuantity.ToString(); } }