// ************************ // Beer Postings Methods // ************************ public BeerPosting CreatePosting(ApplicationUser owner, BeerPosting _newbeerposting) { context.BeerPostings.Add(_newbeerposting); context.SaveChanges(); return _newbeerposting; }
public void BeerPostingEnsureCanAssignBeerQuantity() { BeerPosting havebeer = new BeerPosting { Quantity = 5 }; int expected = 5; int actual = havebeer.Quantity; Assert.AreEqual(expected, actual); }
public void BeerPostingEnsureCanAssignNote() { BeerPosting havebeer = new BeerPosting { Note = "Sample note offering beers here." }; string expected = "Sample note offering beers here."; string actual = havebeer.Note; Assert.AreEqual(expected, actual); }
public void BeerPostingEnsureCanAssignBeerName() { BeerPosting havebeer = new BeerPosting { BeerName = "Sam Adam's Summer Ale"}; string expected = "Sam Adam's Summer Ale"; string actual = havebeer.BeerName; Assert.AreEqual(expected, actual); }
public void BeerPostingEnsureICanCreateInstance() { BeerPosting havebeer = new BeerPosting(); Assert.IsNotNull(havebeer); }