Skip to content
Snippets Groups Projects
Commit 965e35a7 authored by Susan Yuen's avatar Susan Yuen
Browse files

Setup unit testing. Fixed small bug in camera centering

parent 2dfa7ba2
No related branches found
No related tags found
No related merge requests found
Showing
with 165 additions and 1 deletion
......@@ -7,26 +7,46 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blaze_Brigade", "Blaze-Brig
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blaze_BrigadeContent", "Blaze-Brigade\Blaze_BrigadeContent\Blaze_BrigadeContent.contentproj", "{B867170A-1ADD-4151-BFDA-06E292F28986}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazeBrigadeTest", "BlazeBrigadeTest\BlazeBrigadeTest.csproj", "{CCF54A1F-3850-4A2B-9161-C862259852A9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Debug|Xbox 360 = Debug|Xbox 360
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
Release|Xbox 360 = Release|Xbox 360
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F014B39A-8ECB-496E-950A-97D5286D4651}.Debug|Any CPU.ActiveCfg = Debug|x86
{F014B39A-8ECB-496E-950A-97D5286D4651}.Debug|x86.ActiveCfg = Debug|x86
{F014B39A-8ECB-496E-950A-97D5286D4651}.Debug|x86.Build.0 = Debug|x86
{F014B39A-8ECB-496E-950A-97D5286D4651}.Debug|Xbox 360.ActiveCfg = Debug|x86
{F014B39A-8ECB-496E-950A-97D5286D4651}.Debug|Xbox 360.Build.0 = Debug|x86
{F014B39A-8ECB-496E-950A-97D5286D4651}.Release|Any CPU.ActiveCfg = Release|x86
{F014B39A-8ECB-496E-950A-97D5286D4651}.Release|x86.ActiveCfg = Release|x86
{F014B39A-8ECB-496E-950A-97D5286D4651}.Release|x86.Build.0 = Release|x86
{F014B39A-8ECB-496E-950A-97D5286D4651}.Release|Xbox 360.ActiveCfg = Release|x86
{F014B39A-8ECB-496E-950A-97D5286D4651}.Release|Xbox 360.Build.0 = Release|x86
{B867170A-1ADD-4151-BFDA-06E292F28986}.Debug|Any CPU.ActiveCfg = Debug|x86
{B867170A-1ADD-4151-BFDA-06E292F28986}.Debug|x86.ActiveCfg = Debug|x86
{B867170A-1ADD-4151-BFDA-06E292F28986}.Debug|Xbox 360.ActiveCfg = Debug|x86
{B867170A-1ADD-4151-BFDA-06E292F28986}.Release|Any CPU.ActiveCfg = Release|x86
{B867170A-1ADD-4151-BFDA-06E292F28986}.Release|x86.ActiveCfg = Release|x86
{B867170A-1ADD-4151-BFDA-06E292F28986}.Release|Xbox 360.ActiveCfg = Release|x86
{CCF54A1F-3850-4A2B-9161-C862259852A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CCF54A1F-3850-4A2B-9161-C862259852A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CCF54A1F-3850-4A2B-9161-C862259852A9}.Debug|x86.ActiveCfg = Debug|Any CPU
{CCF54A1F-3850-4A2B-9161-C862259852A9}.Debug|x86.Build.0 = Debug|Any CPU
{CCF54A1F-3850-4A2B-9161-C862259852A9}.Debug|Xbox 360.ActiveCfg = Debug|Any CPU
{CCF54A1F-3850-4A2B-9161-C862259852A9}.Debug|Xbox 360.Build.0 = Debug|Any CPU
{CCF54A1F-3850-4A2B-9161-C862259852A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CCF54A1F-3850-4A2B-9161-C862259852A9}.Release|Any CPU.Build.0 = Release|Any CPU
{CCF54A1F-3850-4A2B-9161-C862259852A9}.Release|x86.ActiveCfg = Release|Any CPU
{CCF54A1F-3850-4A2B-9161-C862259852A9}.Release|x86.Build.0 = Release|Any CPU
{CCF54A1F-3850-4A2B-9161-C862259852A9}.Release|Xbox 360.ActiveCfg = Release|Any CPU
{CCF54A1F-3850-4A2B-9161-C862259852A9}.Release|Xbox 360.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
......@@ -719,7 +719,7 @@ namespace Controller
camera.Position = new Vector2(camera.Position.X, 0);
}
if (camera.Position.X < boundaryY)
if (camera.Position.Y < boundaryY)
{
camera.Position = new Vector2(camera.Position.X, boundaryY);
}
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{CCF54A1F-3850-4A2B-9161-C862259852A9}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BlazeBrigadeTest</RootNamespace>
<AssemblyName>BlazeBrigadeTest</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
<IsCodedUITest>False</IsCodedUITest>
<TestProjectType>UnitTest</TestProjectType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
<Choose>
<When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'">
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework" />
</ItemGroup>
</Otherwise>
</Choose>
<ItemGroup>
<Compile Include="GameFunctionTest.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Blaze-Brigade\Blaze_Brigade\Blaze_Brigade.csproj">
<Project>{f014b39a-8ecb-496e-950a-97d5286d4651}</Project>
<Name>Blaze_Brigade</Name>
</ProjectReference>
</ItemGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
</ItemGroup>
</When>
</Choose>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Blaze_Brigade;
namespace ControllerTest
{
[TestClass]
public class GameFunctionTest
{
[TestMethod]
public void isEnemyUnitInRange_WhenEnemyInRange_ShouldReturnTrue()
{
//Unit unit = getNewUnit(UnitType.Warrior, new Vector2(17 * 32f, 15 * 32f), player1);
//Unit enemyUnit = getNewUnit(UnitType.Warrior, new Vector2(18 * 32f, 15 * 32f), player2);
}
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("BlazeBrigadeTest")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BlazeBrigadeTest")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("ccf54a1f-3850-4a2b-9161-c862259852a9")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment