PageRenderTime 21ms CodeModel.GetById 6ms app.highlight 11ms RepoModel.GetById 1ms app.codeStats 0ms

/Source Code/UnitTests/BibleSupportTest.vb

#
Visual Basic | 53 lines | 34 code | 9 blank | 10 comment | 0 complexity | 448322743320dcbd7fb09d50fec17037 MD5 | raw file
 1Imports System.Collections.Generic
 2Imports Microsoft.VisualStudio.TestTools.UnitTesting
 3Imports PowerSong.SongDatabase.Bibles
 4
 5'''<summary>
 6'''This is a test class for BibleSupportTest and is intended
 7'''to contain all BibleSupportTest Unit Tests
 8'''</summary>
 9<TestClass()> _
10Public Class BibleSupportTest
11
12    '''<summary>
13    '''A test for BookNames
14    '''</summary>
15    <TestMethod()> _
16    Public Sub BookNamesTest()
17
18        Assert.AreEqual("Amos", BibleSupport.BookNames(BibleSupport.BibleBook.Amos))
19        Assert.AreEqual("Ecclesiastes", BibleSupport.BookNames(BibleSupport.BibleBook.Ecclesiastes))
20        Assert.AreEqual("Hebrews", BibleSupport.BookNames(BibleSupport.BibleBook.Hebrews))
21        Assert.AreEqual("Song of Solomon", BibleSupport.BookNames(BibleSupport.BibleBook.SongOfSolomon))
22        Assert.AreEqual("Titus", BibleSupport.BookNames(BibleSupport.BibleBook.Titus))
23        Assert.AreEqual("2 Samuel", BibleSupport.BookNames(BibleSupport.BibleBook.TwoSamuel))
24
25    End Sub
26
27    ''' <summary>
28    ''' A test for DetermineSingleReference
29    ''' </summary>
30    <TestMethod()> _
31    Public Sub DetermineSingleReferenceTest()
32
33        Dim Check1 As SongDatabase.Bibles.BibleReference = BibleSupport.DetermineSingleReference("GE1")
34        Dim Check2 As SongDatabase.Bibles.BibleReference = BibleSupport.DetermineSingleReference("EX5")
35        Dim Check3 As SongDatabase.Bibles.BibleReference = BibleSupport.DetermineSingleReference("RV2")
36        Dim Check4 As SongDatabase.Bibles.BibleReference = BibleSupport.DetermineSingleReference("DA15")
37        Dim Check5 As SongDatabase.Bibles.BibleReference = BibleSupport.DetermineSingleReference("Revelation 12")
38        Dim Check6 As SongDatabase.Bibles.BibleReference = BibleSupport.DetermineSingleReference("1Jn3:5")
39        Dim Check7 As SongDatabase.Bibles.BibleReference = BibleSupport.DetermineSingleReference("2 John 1:15")
40        Dim Check8 As SongDatabase.Bibles.BibleReference = BibleSupport.DetermineSingleReference("MATTHEW6V9")
41
42        Assert.AreEqual("Genesis 1", Check1.ToString)
43        Assert.AreEqual("Exodus 5", Check2.ToString)
44        Assert.AreEqual("Revelation 2", Check3.ToString)
45        Assert.AreEqual("Daniel 15", Check4.ToString)
46        Assert.AreEqual("Revelation 12", Check5.ToString)
47        Assert.AreEqual("1 John 3:5", Check6.ToString)
48        Assert.AreEqual("2 John 1:15", Check7.ToString)
49        Assert.AreEqual("Matthew 6:9", Check8.ToString)
50
51    End Sub
52
53End Class