예제 #1
0
            public void _3_다중_하트에_적용할수_있는지()
            {
                ((HeartContainer)A.HeartContainer().With(
                     A.Heart().With(An.Image().WithFillAmount(0.75f)),
                     A.Heart().With(_image_last))).Replenish(2);

                Assert.AreEqual(0.25f, _image_last.fillAmount);
            }
예제 #2
0
 public void _Distributes_Heart_Pieces_Across_Multiple_Unfilled_Hearts()
 {
     ((HeartContainer)A.HeartContainer()
      .With(
          A.Heart().With(An.Image().WithFillAmount(0.75f)),
          A.Heart().With(Target))).Replenish(2);
     Assert.AreEqual(0.25f, Target.fillAmount);
 }
예제 #3
0
 public void _2_Sets_Full_Image_To_75_Percent_Fill_After_Distrubution()
 {
     ((HeartContainer)A.HeartContainer()
      .With(
          A.Heart().With(Target),
          A.Heart()
          .With(An.Image().WithFillAmount(0.25f)))).Deplete(2);
     Assert.AreEqual(0.75f, Target.fillAmount);
 }
예제 #4
0
        public void _Empty_Hearts_Are_Replenished()
        {
            ((HeartContainer)A.HeartContainer()
             .With(
                 A.Heart().With(An.Image().WithFillAmount(1)),
                 A.Heart().With(Target))).Replenish(1);

            Assert.AreEqual(0.25f, Target.fillAmount);
        }
예제 #5
0
 public void _2_SETS_FULL_IMAGE_TO_75_PERCENT_FILL_AFTER_DISTRIBUATION()
 {
     ((HeartContainer)A.HeartContainer()
      .With(
          A.Heart().With(An.Image().WithFillAmount(1)),
          A.Heart().With(Target)
          )).Deplate(1);
     Assert.AreEqual(0.75f, Target.fillAmount);
 }
예제 #6
0
        public void _DISTRIBUTES_HEART_PIECES_ACROSS_MULTIPLE_UNFILLED_HEARTS()
        {
            ((HeartContainer)A.HeartContainer().With(
                 A.Heart().With(An.Image().WithFillAmount(1f)),
                 A.Heart().With(Target)))
            .Replenish(2);

            Assert.AreEqual(0.5f, Target.fillAmount);
        }
예제 #7
0
            public void _1_두개의_하트에서_깍을때의_테스트()
            {
                ((HeartContainer)A.HeartContainer().With(
                     A.Heart().With(target),
                     A.Heart().With(An.Image().WithFillAmount(0.25f)
                                    ))).
                Deplete(2);

                Assert.AreEqual(0.75f, target.fillAmount);
            }
예제 #8
0
        public void BeforeTests()
        {
            _image_last             = An.Image();
            _image_last.fillAmount  = 0f;
            _image_first            = An.Image();
            _image_first.fillAmount = 0f;

            _heartContainer = new HeartContainer(new List <Heart> {
                A.Heart().With(_image_first),
                A.Heart().With(_image_last),
            });
        }
예제 #9
0
            public void _Empty_Hearts_Are_Replenished()
            {
                // Target.fillAmount = 0;
                // var image = new GameObject().AddComponent<Image>();
                // image.fillAmount = 1;
                // var heartContainer = new HeartContainer(
                //     new List<Heart> {new Heart(image), new Heart(Target)});
                // heartContainer.Replenish(1);

                ((HeartContainer)A.HeartContainer()
                 .With(
                     A.Heart().With(An.Image().WithFillAmount(1)),
                     A.Heart().With(Target))).Replenish(1);

                Assert.AreEqual(0.25f, Target.fillAmount);
            }
 public HeartBuilder() : this(An.Image())
 {
 }
예제 #11
0
 public void BeforeEveryTest()
 {
     Target = An.Image().WithFillAmount(1);
 }
예제 #12
0
 public void BeforeEveryTest()
 {
     Target = An.Image();
 }
예제 #13
0
 public void BeforeTests()
 {
     target = An.Image().WithFillAmount(1f);
 }