public void TestJaguarParentTrue() { Jaguar silly = new Jaguar(); bool isFalse = silly.Parent; Assert.False(isFalse); }
public void TestJaguar() { Jaguar jaguar = new Jaguar(); Assert.Equal("Jaguars bite!", jaguar.Bites()); Assert.Equal("Jaguars roar to cry.", jaguar.Cry()); }
static void ImplementInterfaces() { Jaguar jaguar = new Jaguar(); Console.WriteLine(jaguar.Sleep); Krill krill = new Krill(); Console.WriteLine(krill.Swim); }
public void TestJaguarBecameParent() { Jaguar silly = new Jaguar(); silly.Parent = true; bool isTrue = silly.Parent; Assert.True(isTrue); }
static void OverrideAbstractMethods() { Cat cat = new Cat(); Console.WriteLine(cat.Bites()); Console.WriteLine(cat.Cry()); Jaguar jaguar = new Jaguar(); Console.WriteLine(jaguar.Bites()); Console.WriteLine(jaguar.Cry()); }
public void JaguarsCanClimbTest() { // Arrange Jaguar jaguar = new Jaguar(); // Act bool climb = jaguar.CanClimb; // Assert Assert.True(climb); }
public void When_Price_IsRequested_Then_ExpectedResultIsReturned() { //setup var sut = new Jaguar(); double expectedResult = 35000; //action var result = sut.Price(); //assert Assert.IsNotNull(result); Assert.AreEqual(expectedResult, result); }
// turningpid turn; public Robot2() { button = new DigitalInput(0); NavX = new AHRS(SPI.Port.MXP); frontLeft = new Jaguar(4); frontRight = new Jaguar(2); backLeft = new Jaguar(5); backRight = new Jaguar(3); joystick = new Joystick(0); frontRight.Inverted = true; backRight.Inverted = true; shooter = new Jaguar(1); turrent = new Jaguar(0); collector = new Jaguar(6); // turn = new turningpid(); }
public void When_ShowBasicDetails_IsRequested_Then_ConsoleWritesOut() { //setup var sut = new Jaguar(); string expectedOutput = $"Name: Jaguar{Environment.NewLine}Model No: XType{Environment.NewLine}"; //action using (var consoleOutput = new ConsoleOutput()) { sut.ShowBasicDetails(); //assert Assert.AreEqual(expectedOutput, consoleOutput.GetOuput()); } }
public void When_DiscountedPriceForJaguar_IsRequested_Then_ConsoleWritesOut() { //setup var objJaguar = new Jaguar(); var sut = new DiscountedDecorator(objJaguar); double expectedPrice = 3500; string expectedOutput = $"Discounted Price: {expectedPrice}{Environment.NewLine}"; //action using (var consoleOutput = new ConsoleOutput()) { sut.DiscountedPrice(); //assert Assert.AreEqual(expectedOutput, consoleOutput.GetOuput()); } }
/// <summary> /// This just tests that the classes inherit properties /// </summary> static void Proof() { ChannelCatfish channelCatfish = new ChannelCatfish(); FlatheadCatfish flatheadCatfish = new FlatheadCatfish(); TigerShark tigerShark = new TigerShark(); GreatWhiteShark greatWhiteShark = new GreatWhiteShark(); EmperorPenguin emperorPenguin = new EmperorPenguin(); GalapagosPenguin galapagosPenguin = new GalapagosPenguin(); Mallard mallard = new Mallard(); MandarinDuck mandarinDuck = new MandarinDuck(); PrairieFalcon prairieFalcon = new PrairieFalcon(); Gyrfalcon gyrfalcon = new Gyrfalcon(); Dragon dragon = new Dragon(); KomodoDragon komodoDragon = new KomodoDragon(); Anaconda anaconda = new Anaconda(); Rattlesnake rattlesnake = new Rattlesnake(); Dhole dhole = new Dhole(); TundraWolf tundraWolf = new TundraWolf(); HouseCat houseCat = new HouseCat(); Jaguar jaguar = new Jaguar(); Console.WriteLine($"channel catfish gets food: {channelCatfish.FoodAquisition()}"); Console.WriteLine($"flathead catfish habitat: {flatheadCatfish.Habitat}"); Console.WriteLine($"great white shark cares for young?: {greatWhiteShark.CaresForYoung}"); Console.WriteLine($"tiger shark move: {tigerShark.FastestMovement()}"); Console.WriteLine($"emperor penguin swims?: {emperorPenguin.Sing()}"); Console.WriteLine($"galapagos penguin moves: {galapagosPenguin.FastestMovement()}"); Console.WriteLine($"mallard sound: {mallard.Sound()}"); Console.WriteLine($"mandarin duck does barrel roll?: {mandarinDuck.BarrelRoll()}"); Console.WriteLine($"gyrfalcon does barrel roll?: {gyrfalcon.BarrelRoll()}"); Console.WriteLine($"prairie falcon sound: {prairieFalcon.Sound()}"); Console.WriteLine($"dragon does barrel roll?: {dragon.BarrelRoll()}"); Console.WriteLine($"komodo dragon birth: {komodoDragon.Birth()}"); Console.WriteLine($" anaconda swims?: {anaconda.Sing()}"); Console.WriteLine($" rattlesnake gets food: {rattlesnake.FoodAquisition()}"); Console.WriteLine($"dhole gets food: {dhole.FoodAquisition()}"); Console.WriteLine($"dhole birth: {dhole.Birth()}"); Console.WriteLine($"tundra wolf move: {tundraWolf.FastestMovement()}"); Console.WriteLine($"house cat gets food: {houseCat.FoodAquisition()}"); Console.WriteLine($"jaguar can climb?: {jaguar.CanClimb}"); }
static void Main(string[] args) { Console.WriteLine("Hello World!"); Surf_Scoter msDuck = new Surf_Scoter(); Erect_crested dudeErect = new Erect_crested(); Wolf wolfie = new Wolf(); Jaguar puss = new Jaguar(); Gecko larry = new Gecko(); Rattle_Snake silly = new Rattle_Snake(); Console.WriteLine("Meet Ms Duck"); Console.WriteLine(msDuck.Noise()); Console.WriteLine("Meet Dude Erect"); Console.WriteLine(dudeErect.Noise()); Console.WriteLine("Meet wolfie"); Console.WriteLine(wolfie.Noise()); Console.WriteLine("Meet da puss"); Console.WriteLine(wolfie.Noise()); Console.WriteLine("Im larry the lizard"); Console.WriteLine(larry.Noise()); Console.WriteLine("Im silly the snake"); Console.WriteLine(silly.Noise()); Console.ReadLine(); }
public void TestJaguarDietInterface() { Jaguar silly = new Jaguar(); Assert.Equal("I eat whatever I can catch", silly.Diet()); }
public void TestJaguarNoisetInterface() { Jaguar silly = new Jaguar(); Assert.Equal("Snarl", silly.Noise()); }