Example #1
0
        public void AddEmployee_NameSophie_ReturnsNameSophie()
        {
            var healthDataHolder = new HealthDataHolder();

            healthDataHolder.AddEmployee("123456789", "Sophie", "36.5", false, false);
            Assert.Equal("Sophie", healthDataHolder.DataHolder["123456789"].Name);
        }
Example #2
0
        public void ContainsKey_InputParameterExistedGinNumber_ReturnsTrue()
        {
            var healthDataHolder = new HealthDataHolder();

            healthDataHolder.AddEmployee("123456789", "Sophie", "36.5", false, false);
            Assert.True(healthDataHolder.ContainsKey("123456789"));
        }
Example #3
0
        public void DeleteEmployee_UnexistedGinNumber_ReturnsFalse()
        {
            var healthDataHolder = new HealthDataHolder();

            healthDataHolder.AddEmployee("123456789", "Sophie", "36.5", false, false);
            Assert.True(!healthDataHolder.DeleteEmployee("111111"));
        }
Example #4
0
        public void DeleteEmployee_CheckSuccess()
        {
            var healthDataHolder = new HealthDataHolder();

            healthDataHolder.AddEmployee("123456789", "Sophie", "36.5", false, false);
            healthDataHolder.DeleteEmployee("123456789");
            Assert.False(healthDataHolder.DataHolder.ContainsKey("123456789"));
        }
Example #5
0
        public void EditEmployee_Temperature38_ReturnsTemperature38()
        {
            var healthDataHolder = new HealthDataHolder();

            healthDataHolder.AddEmployee("123456789", "Sophie", "36.5", false, false);
            healthDataHolder.EditEmployee(healthDataHolder.DataHolder, "123456789", "Sophie", "38", true, false);
            Assert.Equal("38", healthDataHolder.DataHolder["123456789"].Temperature);
        }