NUnit Framework ? mbUnit - PowerPoint PPT Presentation

About This Presentation
Title:

NUnit Framework ? mbUnit

Description:

Title: NUnit Framework and mbUnit Author: Martin Marinov Description: Bulgarian Association of Software Developers - http://www.devbg.org Last modified by – PowerPoint PPT presentation

Number of Views:41
Avg rating:3.0/5.0
Slides: 13
Provided by: MartinM93
Learn more at: https://www.devbg.org
Category:

less

Transcript and Presenter's Notes

Title: NUnit Framework ? mbUnit


1
NUnit Framework ? mbUnit
  • ?????? ???????

2
??????????
  • ?????????
  • ?????????? ?? ?????? ???? ? ?????
  • ????????? ?? ?????????
  • ????????????? ?? ????? ????? ????
  • ???????????? ???????????
  • MbUnit

3
?????????
  • De facto NUnit ? ???????? ?? unit ??????? ?? .NET
  • ??????? ?? ??????????? ?? jUnit
  • ???????? ?? www.nunit.org
  • ?????? ?????? v2.2.2
  • ??????? ?? C, J, VB.NET
  • ??? ??????????
  • nunit-gui.exe
  • nunit-console.exe

4
?????? ???? ? ?????? ?????
  • ?????????? ?? ?????? ????
  • ????????? ?? ?? framework ???? ???? ????????
    ???????
  • TestFixture public class SomeTests //
  • ?????????? ?? ?????? ?????
  • ????? ????? ? ????????? Test public void
    TestMethod() //

5
????????? ?? ?????????
  • ?????????? ?? NUnit.Framework.Assert
  • ????????? ??????????? ?? ??????????
  • ?????????? ?? ?????????
  • AreEqual (???????? ????????, ???????? ????????
    ,?????????)
  • ?????????? ?? ??????
  • IsNull(????? , ?????????), IsNotNull(????? ,
    ?????????)
  • AreSame(???????? ????????, ???????? ????????
    ,?????????)
  • AreNotSame
  • ???????
  • IsTrue ( ??????? ), IsFalse ( ??????? )
  • ????????????? ?????????? - Fail()

6
????
7
????????????? ?? ????? ????? ????
  • ?????????????? ?? ????? ????? ?????????? ?? ?????
    SetUp
  • ??????????? ?? ????? ???? ?????????? ?? ????? -
    TearDown
  • ?????????????? ?? ????? ????? ?????? ?????? -
    TestFixtureSetUp
  • ??????????? ?? ????? ???? ?????????? ?? ??????
    ?????? -TestFixtureTearDown

8
???????????? ???????????
  • ?????????? ?? ???????? ?????????? ??? ????
    ExpectedException ( InvalidCastException)
  • ?????????? ???????????? ?? ??????? ??????
    Ignore("Ignore a test")

9
???????????? ???????????
  • ??????? ?????????? ?? ???????TestFixture,
    ExplicitTest, Explicit
  • ?????????????? ?? ???????TestFixture,
    Category("LongRunning")Test, Category(Long)

10
MbUnit
  • MbUnit Framework
  • ???????? ?? www.testdriven.net
  • ?????? ?????? 2.22
  • Reports
  • ???????????? ???????????
  • GUI

11
Demo
12
Q A
?????? ???????
mmarinov_at_crossroad.bg
Write a Comment
User Comments (0)
About PowerShow.com