Example #1
0
        public void SetAPIKeyShouldChangeKey(string key)
        {
            //Arrange
            OpenWeaherAPI api        = new OpenWeaherAPI();
            string        currentKey = api.GetAPIKey();

            Assert.NotSame(currentKey, key);
            //Act
            api.SetAPIKey(key);
            //Assert
            currentKey = api.GetAPIKey();
            Assert.Equal(currentKey, key);
        }
Example #2
0
        public void GetAPIKeyShouldReturnCorrectKey()
        {
            //Arrange
            OpenWeaherAPI api = new OpenWeaherAPI();
            //Act
            string currentKey = api.GetAPIKey();

            //Assert
            Assert.NotNull(currentKey);
        }