public void SimpleAIDataElementTestForIntegerNotInitialized() { //Arrange var simpleInteger = new SimpleAIDataElement <int?>(); //Assert Assert.IsFalse(simpleInteger.GetAsBoolean()); Assert.IsNull(simpleInteger.GetDataValue()); Assert.AreEqual(simpleInteger.GetDataType(), typeof(int?)); }
public void BlackBoardBaseAddToInts() { //Arrange string key = "NULLABLE_INT"; int value = 1; SimpleAIDataElement <int> simpleDataElement = new SimpleAIDataElement <int>(value); //Act BlackBoard.Instance.Objects.Add(key, simpleDataElement); SimpleAIDataElement <int> result = (SimpleAIDataElement <int>)BlackBoard.Instance.Objects[key]; //Assert Assert.AreEqual(value.GetType(), result.GetDataType()); Assert.AreEqual(value, result.GetDataValue()); }
public void BlackBoardBaseAddSimpleAIDataElementToObjects() { //Arrange string key = "SIMPLE_AI_DATA_ELEMENT"; int value = 1; SimpleAIDataElement <int> simpleAIDataElement = new SimpleAIDataElement <int>(); simpleAIDataElement.SetDataValue(value); //Act BlackBoard.Instance.Objects.Add(key, simpleAIDataElement); SimpleAIDataElement <int> result = (SimpleAIDataElement <int>)BlackBoard.Instance.Objects[key]; //Assert Assert.AreEqual(value.GetType(), result.GetDataType()); Assert.AreEqual(value, result.GetDataValue()); }