Пример #1
0
        public void ProcessAllegiance()
        {
            //Arrange
            var isAllyOf = "Space"; //This is our expected value - we simulate a situation where a given Kingdom becomes an Ally of Space Kingdom

            var space = new Set5Problem2_CSharp.Kingdom("Space", "Gorilla");
            var air   = new Set5Problem2_CSharp.Kingdom("Air", "Owl");

            //Act
            air.ProcessAllegiance(true, space);
            var airIsAllyOf = air.IsAllyOf();

            //Assert
            Assert.AreEqual(isAllyOf, airIsAllyOf);
        }
Пример #2
0
        public void WhoIsAllyOfKingdom()
        {
            //Arrange
            var allyOf = "Space"; //This is our expected value - we are simulating a scenario where a given kingdom has become an Ally of Space

            var space = new Set5Problem2_CSharp.Kingdom("Space", "Gorilla");
            var air   = new Set5Problem2_CSharp.Kingdom("Air", "Owl");

            var message = "oaaawaala";

            //Act
            space.SendMessage(message, air);
            //Air has become an Ally of Space, so this method is expected to return "Space"
            var ally = air.IsAllyOf();

            //Assert
            Assert.AreEqual(allyOf, ally);
        }