public void TestGetItem1() { var item1 = new AuctionItem("title", "12", "http://www.stuff.co.nz"); group.AddItem(item1); AuctionItem item = group.GetFirstItem(); Assert.AreEqual(item, item); }
public CatigoryItemGroup() { //items = new List<AuctionItem>(); first = new AuctionItem("title 1", "12", "http://www.stuff.co.nz"); second = new AuctionItem("title 2", "12", "http://www.stuff.co.nz"); name = "Some name"; CatUrl = "URL"; }
public CatigoryItemGroup(string name, List<TrademeAccessor.QueryResult> qItems) { // TODO: fix assume Random rand = new Random(DateTime.Today.Second); int num1 = rand.Next(qItems.Count - 1); first = new AuctionItem(qItems[num1]); int num2 = rand.Next(qItems.Count - 1); while (num1 == num2) { num2 = rand.Next(qItems.Count-1); } second = new AuctionItem(qItems[num2]); this.name = name; }
public CatigoryItemGroup(string name, List <TrademeAccessor.QueryResult> qItems) { // TODO: fix assume Random rand = new Random(DateTime.Today.Second); int num1 = rand.Next(qItems.Count - 1); first = new AuctionItem(qItems[num1]); int num2 = rand.Next(qItems.Count - 1); while (num1 == num2) { num2 = rand.Next(qItems.Count - 1); } second = new AuctionItem(qItems[num2]); this.name = name; }
public CatigoryItemGroup(string name, List<TrademeAccessor.QueryResult> qItems) { // Vaildate if (qItems == null || qItems.Count == 0) { throw new ArgumentException("You must supply items and there must be elements", "qItems"); } Random rand = new Random(DateTime.Today.Second); int num1 = rand.Next(qItems.Count - 1); first = new AuctionItem(qItems[num1]); int num2 = rand.Next(qItems.Count - 1); while (num1 == num2) { num2 = rand.Next(qItems.Count-1); } second = new AuctionItem(qItems[num2]); this.name = name; }
public void TestParamConstruct() { var item2 = new AuctionItem("title", "12", "http://www.stuff.co.nz"); }
public void Init() { item = new AuctionItem(); }
public void AddItem(AuctionItem auctionItem) { first = auctionItem; }