public void GetBuildingID_WhenInputCase_ReturnAreEqual() { // Arrange string input = "MYID"; BuildingController buildingController = new BuildingController(input); // Act string output = buildingController.GetBuildingID(); // Assert Assert.AreEqual("myid", output); }
public void BuildingControllerParamter_WhenGetBuildingID_ReturnAreEqual() { // Arrange string input = "id"; BuildingController buildingController = new BuildingController(input); // Act string output = buildingController.GetBuildingID(); // Assert Assert.AreEqual(input, output); }
public void SetBuildingID_WhenGetBuildingID_ReturnAreEqual() { // Arrange string input = "id"; BuildingController buildingController = new BuildingController("idString"); // Act buildingController.SetBuildingID(input); string output = buildingController.GetBuildingID(); // Assert Assert.AreEqual(input, output); }
public void SetBuildingID_WhenInputCase_ReturnAreEqual(string parameterInput) { // Arrange string input = parameterInput; BuildingController buildingController = new BuildingController("idString"); // Act buildingController.SetBuildingID(input); string output = buildingController.GetBuildingID(); // Assert Assert.AreEqual(input.ToLower(), output); }
// Test will pass if building ID is not the same as the default ID public void GetBuildingId_NotUsingDefaultValue_ReturnsTrue(string id) { // Arrange var lightManager = Substitute.For <ILightManager>(); var doorManager = Substitute.For <IDoorManager>(); var emailService = Substitute.For <IEmailService>(); var fireAlarm = Substitute.For <IFireAlarmManager>(); var webService = Substitute.For <IWebService>(); BuildingController testBuilding = new BuildingController(id, lightManager, fireAlarm, doorManager, webService, emailService); // Act string actual = testBuilding.GetBuildingID(); string expected = "foster building"; // Assert Assert.AreNotEqual(expected, actual); }