Beispiel #1
0
        protected override void Create()
        {
            var hudBumperStickerType = new HudBumperStickerType(true);

            BumperStickers.Add(hudBumperStickerType);
            SelectedBumperSticker = hudBumperStickerType;
        }
            private static bool AreEquals(HudBumperStickerType first, HudBumperStickerType second)
            {
                if (first == null && second == null)
                {
                    return(true);
                }
                if (first == null || second == null)
                {
                    return(false);
                }

                if (first.Description == "3-Bets too much, and folds to a 4-bet too often.")
                {
                    first.Description = "3-Bets too much, and folds to a 3-bet too often.";
                }
                if (second.Description == "3-Bets too much, and folds to a 4-bet too often.")
                {
                    second.Description = "3-Bets too much, and folds to a 3-bet too often.";
                }
                if (first.Description == "Open raises to wide of a range in early pre-flop positions.")
                {
                    first.Description = "Open raises too wide of a range in early pre-flop positions.";
                }
                if (second.Description == "Open raises to wide of a range in early pre-flop positions.")
                {
                    second.Description = "Open raises too wide of a range in early pre-flop positions.";
                }
                if (first.Name != second.Name || first.Label != second.Label || first.Description != second.Description ||
                    first.ToolTip != second.ToolTip || first.EnableBumperSticker != second.EnableBumperSticker ||
                    first.MinSample != second.MinSample || first.SelectedColor != second.SelectedColor)
                {
                    return(false);
                }

                return(AreEquals(first.Stats.OfType <HudPlayerTypeStat>(), second.Stats.OfType <HudPlayerTypeStat>()) &&
                       AreEquals(first.FilterModelCollection, second.FilterModelCollection));
            }
Beispiel #3
0
        public void HudBumperStickerTypeFilterModelCollectionSerializeTest()
        {
            var filterHoleCardsModelExpected = new FilterHoleCardsModel();

            filterHoleCardsModelExpected.Initialize();

            var filterHandValueModel = new FilterHandValueModel();

            filterHandValueModel.Initialize();

            var filterHandActionModelExpected = new FilterHandActionModel();

            filterHandActionModelExpected.Initialize();

            var hudBumperStickerTypeExpected = new HudBumperStickerType();

            hudBumperStickerTypeExpected.FilterModelCollection = new IFilterModelCollection {
                filterHoleCardsModelExpected, filterHandValueModel, filterHandActionModelExpected
            };

            var hudBumperStickerTypeActual = SerializerHelper.GetXmlSerializedDeserializedObject(hudBumperStickerTypeExpected);

            Assert.That(hudBumperStickerTypeActual.FilterModelCollection.Count, Is.EqualTo(hudBumperStickerTypeExpected.FilterModelCollection.Count));
        }