mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.1 KiB
37 lines
1.1 KiB
// ==========================================================================
|
|
// AppDomainObjectTest.cs
|
|
// PinkParrot Headless CMS
|
|
// ==========================================================================
|
|
// Copyright (c) PinkParrot Group
|
|
// All rights reserved.
|
|
// ==========================================================================
|
|
|
|
using System;
|
|
using PinkParrot.Infrastructure;
|
|
using PinkParrot.Write.Apps;
|
|
using PinkParrot.Write.Apps.Commands;
|
|
using Xunit;
|
|
|
|
namespace PinkParrot.Write.Tests.Apps
|
|
{
|
|
public class AppDomainObjectTest
|
|
{
|
|
private readonly AppDomainObject sut = new AppDomainObject(Guid.NewGuid(), 0);
|
|
|
|
[Fact]
|
|
public void Create_should_throw_if_created()
|
|
{
|
|
sut.Create(new CreateApp { Name = "app" });
|
|
|
|
Assert.Throws<DomainException>(() => sut.Create(new CreateApp { Name = "app" }));
|
|
}
|
|
|
|
[Fact]
|
|
public void Create_should_specify_name()
|
|
{
|
|
sut.Create(new CreateApp { Name = "app" });
|
|
|
|
Assert.Equal("app", sut.Name);
|
|
}
|
|
}
|
|
}
|
|
|