public void IntegrationTestCombatArmyEncodeToAzureString() { // Arrange Guid regionId = new Guid("EF29EC0A-50E2-4207-9F94-D5D70C280D87"); CombatArmy army = new CombatArmy(regionId, "TestUser", Core.CombatArmyMode.Attacking, 5); // Act String result = army.EncodeToAzureString(); // Assert Assert.AreEqual("ef29ec0a-50e2-4207-9f94-d5d70c280d87#TestUser#0#5", result); }
public void IntegrationTestCombatArmyCreateFromAzureString() { // Arrange String testString = "EF29EC0A-50E2-4207-9F94-D5D70C280D87#TestUser#0#5"; // Act CombatArmy army = CombatArmy.CreateFromAzureString(testString); // Assert Assert.AreEqual(new Guid("EF29EC0A-50E2-4207-9F94-D5D70C280D87"), army.OriginRegionId); Assert.AreEqual("TestUser", army.OwnerUserId); Assert.AreEqual(Core.CombatArmyMode.Attacking, army.ArmyMode); Assert.AreEqual(5U, army.NumberOfTroops); }