예제 #1
0
        public void TestInsert()
        {
            LeaderBoard userRank = new LeaderBoard();

            userRank.Username = "******";
            userRank.Score    = 50;
            Assert.True(LeaderBoardDBConnector.Create(dataSource, userRank));
        }
예제 #2
0
        public void TestDelete()
        {
            LeaderBoard userRank = new LeaderBoard();

            userRank.Username = "******";
            userRank.Score    = 50;
            Assert.True(LeaderBoardDBConnector.Create(dataSource, userRank));

            List <LeaderBoard> leaderboard = LeaderBoardDBConnector.GetLeaderBoard(dataSource);

            Assert.NotNull(leaderboard);
            int count = leaderboard.Count;

            Assert.True(LeaderBoardDBConnector.Delete(dataSource, "Test Delete User"));

            leaderboard = LeaderBoardDBConnector.GetLeaderBoard(dataSource);

            Assert.NotNull(leaderboard);
            Assert.Equal(count - 1, leaderboard.Count);
        }