示例#1
0
        public void TestGradeBook()
        {
            //arrange
            var book = new GradeBook.Book("C++");

            book.AddBookGrade(1.33);
            book.AddBookGrade(5.33);
            book.AddBookGrade(3.33);

            //act
            var result = book.ShowStaticstic();

            //assert
            Assert.Equal(5.333, result, 2);
        }
示例#2
0
        static void Main(string[] args)
        {
            var book = new Book("C# Programming");

            book.AddBookGrade(5.66);
            book.AddBookGrade(33.66);
            book.AddBookGrade(522.66);
            book.AddBookGrade(2.66);
            book.AddBookGrade(325.66);
            book.AddBookGrade(333.66);
            book.ShowStaticstic();
        }