Рекомендуемая Книга Поблочного тестирования для [закрытой] среды MVC ASP.NET

Вы почти у цели! Все, что вам нужно сделать, это заключить элементы списка в строки.

Что вы делаете сейчас:

a = 'WIKI/'+ i + '.11'                  # Where i is an object, probably a pointer/instance

Что нужно сделать:

a = 'WIKI/'+ i + '.11'                  # Where i is a good-old-happy string

Итак, ваш код, ваш код должен выглядеть примерно так:

import numpy as np
import pandas as pd


import matplotlib.pyplot as plt
import quandl

start = pd.to_datetime('2012-01-01')
end = pd.to_datetime('2017-01-01')


# You have to add Strings to calculate i (But, you are adding objects)
L = ["aap1", "csco", "ibm", "amzn"]
L_i = []
for i in L:
    a = 'WIKI/'+ i + '.11'
    i = quandl.get(a, start_date=start, end_date=end)
    # Then do whatever you want with the i-s : L_i.append(i)
11
задан razlebe 26 November 2011 в 10:40
поделиться

8 ответов

It seems that all of the newer ASP.NET MVC books have at least one chapter on unit testing.

I have recently completed Steve Sanderson's book Pro ASP.NET MVC Framework and I thought the author placed a strong emphasis on unit testing. The book doesn't have a dedicated chapter on unit testing, but just about every chapter has relevant sections or call-outs/sidebars that deal with testing routing (inbound and outbound), controllers, repositories, model binders, etc. If I remember he uses the nUnit and Moq libraries in great detail. You can preview parts of his book on Google Books : Pro ASP.NET MVC Framework or order it from Apress (their eBooks are reasonably priced but password protected with your email address which is sort of a pain for me) or from Amazon.

I haven't seen any plans for a book solely on ASP.NET MVC unit testing, so you're going to probably have to stick to blogs or with whatever content you can find in the upcoming ASP.NET MVC books (like I said, it seems that all of them cover unit testing to varying degrees).

Some of the books that I know of:

Wrox: Beginning ASP.NET MVC 1.0 --- Has a sample chapter on testing for download here.

Manning: ASP.NET MVC in Action --- Doesn't have an explicit chapter on testing, but if you download the CodeCampServer reference application you will find a ton of unit, integration, and regression tests.

Wrox: Professional ASP.NET MVC 1.0 --- Has unit tests in the NerdDinner sample application and a dedicated chapter on testing. Testing Guru Roy Osherove (author of The Art of Unit Testing) reviews the NerdDinner tests here.

Packt: ASP.NET MVC 1.0 Quickly --- Has a chapter on unit testing and the author has a pretty good blog that talks about various ASP.NET MVC issues including testing.

Sams: ASP.NET MVC Framework Unleashed --- Browsing the Table of Contents for the book reveals a fair amount of content dedicated to testing (mocking, TDD, etc). You can check out the author's blog for sample content from the upcoming book and other ASP.NET MVC and TDD related posts.

10
ответ дан 3 December 2019 в 02:53
поделиться

the art of unit testing

http://www.artofunittesting.com/

8
ответ дан 3 December 2019 в 02:53
поделиться

I like Kent Beck's "Test Driven Development: By Example" (amazon link) as an introduction to TDD, it's not specific to C# nor ASP.NET MVC.

4
ответ дан 3 December 2019 в 02:53
поделиться

Я большой поклонник книг Pragmatic Press

Тестирование Pragmatic Unit на C #

3
ответ дан 3 December 2019 в 02:53
поделиться

I recommend to start with Pragmatic Unit Testing in C# with NUnit because it's easy to read and is very concrete with C# (ideal if you use C# for ASP.NET). After that go on with XUnit Test Patterns. It's more universal, gives you a lot of ideas and serves as a very good reference.

3
ответ дан 3 December 2019 в 02:53
поделиться

не знаю ни одной специально для этого, но это библия: http://xunitpatterns.com/ .

не книга, но возможно полезно: http://www.codeplex.com/xunit

1
ответ дан 3 December 2019 в 02:53
поделиться

См. Список рекомендуемых книг в статье IEEE Software TDD: Искусство бесстрашного программирования . В нем есть комментарий и уровень, связанный с каждым из них.

Некоторые из них:

  • Кент Бек, TDD by Example, Addison-Wesley, 2002 (вводный)
  • Дэвид Астелс, Разработка через тестирование: Практическое руководство , Prentice Hall, 2003 (средний уровень)
  • Джеймс Ньюкирк и Алексей Воронцов, Разработка через тестирование в Microsoft .NET, Microsoft Press, 2004 (средний уровень)
0
ответ дан 3 December 2019 в 02:53
поделиться

Well, if it's bible you're looking for, check out xUnit Test Patterns by Gerard Meszaros. It's got theory, test smells, and patterns w/ examples. (That'd be the one Ray T. recommended up above.)

If you're looking for higher level tests (especially through the UI) check out the eBooks by Gojko Adzic (www.acceptancetesting.info and www.fitnesse.info)

1
ответ дан 3 December 2019 в 02:53
поделиться
Другие вопросы по тегам:

Похожие вопросы: