Example #1
0
 public void GetBackTest()
 {
     try
     {
         Error.ErrorReporter.IsUnitTesting = true;
         LoadedCardResources.LoadResources870x1200();
         if (LoadedCardResources.GetBack() == null)
         {
             Assert.Fail("Something is wrong");
         }
         LoadedCardResources.LoadResources960x1440();
         if (LoadedCardResources.GetBack() == null)
         {
             Assert.Fail("Something is wrong");
         }
         LoadedCardResources.LoadResourcesHighestRes();
         if (LoadedCardResources.GetBack() == null)
         {
             Assert.Fail("Something is wrong");
         }
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
 }
 /// <summary>
 /// The constructor for the MiddleStack class.
 /// </summary>
 public MiddleStack(GolfLogic GolfGame)
 {
     try
     {
         this.ConstructMe(LoadedCardResources.GetBack(), this.GetSize(), this.GetTopLeft());
         Game = GolfGame;
     }
     catch (Exception TheException)
     {
         ErrorReporter.Report(TheException);
     }
 }
Example #3
0
 /// <summary>
 /// Called by the form, to do some start up stuff.
 /// </summary>
 public void Startup()
 {
     try
     {
         Filing.DoMaintinence();
         LoadedCardResources.LoadResources();
         this.SetupForm();
         VariableStorage.TheForm.Text = VariableStorage.GetRandomTitle();
     }
     catch (Exception TheException)
     {
         ErrorReporter.Report(TheException);
     }
 }
Example #4
0
        public void GetResourceTest()
        {
            try
            {
                Error.ErrorReporter.IsUnitTesting = true;

                LoadedCardResources.LoadResources870x1200();

                int i = 0;

                while (i != 54)
                {
                    if (LoadedCardResources.GetResource(i) == null)
                    {
                        Assert.Fail("Something went wrong");
                    }
                    i++;
                }

                i = 0;
                LoadedCardResources.LoadResources960x1440();

                while (i != 54)
                {
                    if (LoadedCardResources.GetResource(i) == null)
                    {
                        Assert.Fail("Something went wrong");
                    }
                    i++;
                }

                i = 0;
                LoadedCardResources.LoadResourcesHighestRes();

                while (i != 54)
                {
                    if (LoadedCardResources.GetResource(i) == null)
                    {
                        Assert.Fail("Something went wrong");
                    }
                    i++;
                }
            }
            catch (Exception e)
            {
                Assert.Fail(e.Message);
            }
        }
Example #5
0
 public void LoadResourcesHighestResTest()
 {
     try
     {
         Error.ErrorReporter.IsUnitTesting = true;
         LoadedCardResources.LoadResourcesHighestRes();
         if (LoadedCardResources.GetResource(20) == null)
         {
             Assert.Fail("Something is wrong");
         }
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
 }