public void SetToastScenarioTest_WithCustomToastScenario_ReturnSelfWithCustomToastScenarioSet() { // Arrange ToastScenario testToastScenario = ToastScenario.Default; // Act ToastContentBuilder builder = new ToastContentBuilder(); ToastContentBuilder anotherReference = builder.SetToastScenario(testToastScenario); // Assert Assert.AreSame(builder, anotherReference); Assert.AreEqual(testToastScenario, builder.Content.Scenario); }
/// <summary> /// Sets the scenario, to make the Toast behave like an alarm, reminder, or more. /// </summary> /// <param name="scenario">Scenario to be used for the toast's behavior</param> /// <returns>The current instance of <see cref="ToastContentBuilder"/></returns> public ToastContentBuilder SetToastScenario(ToastScenario scenario) { Content.Scenario = scenario; return(this); }