Пример #1
0
        public void LoadAllCards()
        {
            var provider = new BoardProvider();
            var board    = provider.Load_all_cards();

            Assert.IsTrue(board.Any());
        }
Пример #2
0
 public void LoadCardById()
 {
     var provider = new BoardProvider();
     var board = provider.Load_all_cards();
     var expected = board.First();
     var actual = provider.LoadCard(expected.Id);
     Assert.AreEqual(expected.Id, actual.Id);
 }
Пример #3
0
        public void LoadCardById()
        {
            var provider = new BoardProvider();
            var board    = provider.Load_all_cards();
            var expected = board.First();
            var actual   = provider.LoadCard(expected.Id);

            Assert.AreEqual(expected.Id, actual.Id);
        }
Пример #4
0
 public void UpdateCardWithoutStore_ShallNotUpdate()
 {
     var provider = new BoardProvider();
     var board = provider.Load_all_cards();
     var expected = board.First();
     expected.ColumnIndex = 42;
     var actual = provider.LoadCard(expected.Id);
     Assert.AreNotEqual(42, actual.ColumnIndex);
 }
Пример #5
0
 public void UpdateExistingCard()
 {
     var provider = new BoardProvider();
     var board = provider.Load_all_cards();
     var expected = board.First();
     expected.ColumnIndex = 42;
     provider.StoreCard(expected);
     var actual = provider.LoadCard(expected.Id);
     Assert.AreEqual(42, actual.ColumnIndex);
 }
Пример #6
0
        public void UpdateCardWithoutStore_ShallNotUpdate()
        {
            var provider = new BoardProvider();
            var board    = provider.Load_all_cards();
            var expected = board.First();

            expected.ColumnIndex = 42;
            var actual = provider.LoadCard(expected.Id);

            Assert.AreNotEqual(42, actual.ColumnIndex);
        }
Пример #7
0
        public void UpdateExistingCard()
        {
            var provider = new BoardProvider();
            var board    = provider.Load_all_cards();
            var expected = board.First();

            expected.ColumnIndex = 42;
            provider.StoreCard(expected);
            var actual = provider.LoadCard(expected.Id);

            Assert.AreEqual(42, actual.ColumnIndex);
        }
Пример #8
0
        public void StoreNewCard()
        {
            var provider = new BoardProvider();
            var expected = new Card() { ColumnIndex = 12345, Id = "qwertz", Text = "asdfghjkl" };
            provider.StoreCard(expected);
            var new_board = provider.Load_all_cards();
            var card_from_board = new_board.Single(c => c.Id == expected.Id);
            Assert.AreEqual(expected.Id, card_from_board.Id);

            var loaded_card = provider.LoadCard(expected.Id);
            Assert.AreEqual(expected.Id, loaded_card.Id);
        }
Пример #9
0
        public void StoreNewCard()
        {
            var provider = new BoardProvider();
            var expected = new Card()
            {
                ColumnIndex = 12345, Id = "qwertz", Text = "asdfghjkl"
            };

            provider.StoreCard(expected);
            var new_board       = provider.Load_all_cards();
            var card_from_board = new_board.Single(c => c.Id == expected.Id);

            Assert.AreEqual(expected.Id, card_from_board.Id);

            var loaded_card = provider.LoadCard(expected.Id);

            Assert.AreEqual(expected.Id, loaded_card.Id);
        }
Пример #10
0
 // Start is called before the first frame update
 void Start()
 {
     BoardProvider.Create(19, 19);
 }
Пример #11
0
 public void LoadAllCards()
 {
     var provider = new BoardProvider();
     var board = provider.Load_all_cards();
     Assert.IsTrue(board.Any());
 }