public void WhenAllOverloadsShouldMatch()
        {
            // Watering multiple plants requires a lot of setup, thus it is easier to test with only 1 plant, but we know the actual implementation is in the lowest overload
            Plant plant = new Melothria();

            plant.Water(new Gardener());
        }
        public void WhenTheAutomatedCodeCannotBeInvokedDirectly()
        {
            // Withering a plant requires a lot of setup, thus it is easier to just invoke it directly
            Plant plant = new Melothria();

            plant.FreezeAndThaw();
        }
        public void WhenThisActuallyMeansThat()
        {
            Plant plant = new Melothria();

            // The FreezeAndThaw method uses the this-operator
            // to reference an abstract method
            plant.FreezeAndThaw();
        }
        public void WhenOnlyTheTopLevelOverloadShouldMatch()
        {
            Plant plant = new Melothria();

            plant.Water(new Gardener());
        }
Exemplo n.º 5
0
        public void WhenAnAsynchronousEntrypointIsInvoked()
        {
            var plant = new Melothria();

            plant.Procreate().GetAwaiter().GetResult();
        }