public void DellSoapProcessor_Given3BadTags_Gives0Responses() { WarrantyEngine.FetchTag(_invalidServiceTag); WarrantyEngine.FetchTag(_invalidServiceTag); WarrantyEngine.FetchTag(_invalidServiceTag); WarrantyEngine.dataTable.Rows.Count.Should().Be(0); }
public void DellSoapProcessor_Fetch_Stripswhitespace() { var firstTag = "HPB7BQ1\r"; var secondTag = "HPB7BQ1 "; WarrantyEngine.FetchTag(firstTag); WarrantyEngine.FetchTag(secondTag); WarrantyEngine.dataTable.Rows.Count.Should().Be(2); }
private void fetchServiceTags() { var tasks = txtServiceTags.Text.Split('\n').Select(str => Task.Factory.StartNew((arg) => { str = str.Trim(); WarrantyEngine.FetchTag(str); Dispatcher.BeginInvoke(new queryDelegate(this.UpdateProgressBar), str); }, str)).ToList(); pbarLow.Maximum = tasks.Count; Task.WaitAll(tasks.ToArray()); }
public void DellSoapProcessor_ValidServiceTagResponse_IncludesPurchaseDate() { WarrantyEngine.FetchTag(_validServiceTag); WarrantyEngine.dataTable.Rows[0].ItemArray[2].ShouldBeEquivalentTo(DateTime.Parse("03/26/2012")); }
public void DellSoapProcessor_ValidServiceTagResponse_IncludesModel() { WarrantyEngine.FetchTag(_validServiceTag); WarrantyEngine.dataTable.Rows[0].ItemArray[1].Should().Be("Inspiron One 2320"); }
public void DellSoapProcessor_GivenInvalidServiceTag_DoesNotGenerateResponse() { WarrantyEngine.FetchTag(_invalidServiceTag); WarrantyEngine.dataTable.Rows.Count.Should().Be(0); }
public void DellSoapProcessor_GivenServiceTag_GeneratesResponse() { WarrantyEngine.FetchTag(_validServiceTag); WarrantyEngine.dataTable.Rows.Count.Should().Be(1); }